diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2023-10-04 01:35:06 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2023-10-04 02:11:48 +0200 |
commit | 1a64deeb894dc95e2645a75771732c6cc53a79ad (patch) | |
tree | 1b9df4838f894577a09b9b260151756272efeb53 /flakes/mypackages/pkgs/webapps/spip/default.nix | |
parent | fa25ffd4583cc362075cd5e1b4130f33306103f0 (diff) | |
download | Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.gz Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.zst Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.zip |
Squash changes containing private information
There were a lot of changes since the previous commit, but a lot of them
contained personnal information about users. All thos changes got
stashed into a single commit (history is kept in a different place) and
private information was moved in a separate private repository
Diffstat (limited to 'flakes/mypackages/pkgs/webapps/spip/default.nix')
-rw-r--r-- | flakes/mypackages/pkgs/webapps/spip/default.nix | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/flakes/mypackages/pkgs/webapps/spip/default.nix b/flakes/mypackages/pkgs/webapps/spip/default.nix new file mode 100644 index 0000000..20d5c8c --- /dev/null +++ b/flakes/mypackages/pkgs/webapps/spip/default.nix | |||
@@ -0,0 +1,32 @@ | |||
1 | { siteName ? "spip" | ||
2 | , siteDir ? runCommand "empty" { preferLocalBuild = true; } "mkdir -p $out" | ||
3 | , environment ? "prod" | ||
4 | , ldap ? false | ||
5 | , varDir ? "/var/lib/${siteName}_${environment}" | ||
6 | , lib, fetchzip, runCommand, stdenv }: | ||
7 | let | ||
8 | app = stdenv.mkDerivation rec { | ||
9 | name = "${siteName}-${environment}-spip-${version}"; | ||
10 | version = "3.2.7"; | ||
11 | src = fetchzip { | ||
12 | url = "https://files.spip.net/spip/archives/SPIP-v${version}.zip"; | ||
13 | sha256 = "0n4kc95nhn524zbb11bpfjs965pm4v026s3m3q44pl8nyms91r33"; | ||
14 | }; | ||
15 | paches = lib.optionals ldap [ ./spip_ldap_patch.patch ]; | ||
16 | buildPhase = '' | ||
17 | rm -rf IMG local tmp config/remove.txt | ||
18 | ln -sf ${./spip_mes_options.php} config/mes_options.php | ||
19 | echo "Require all denied" > "config/.htaccess" | ||
20 | ln -sf ${varDir}/{IMG,local} . | ||
21 | ''; | ||
22 | installPhase = '' | ||
23 | cp -a . $out | ||
24 | cp -a ${siteDir}/* $out | ||
25 | ''; | ||
26 | passthru = { | ||
27 | inherit siteName siteDir environment varDir; | ||
28 | webRoot = app; | ||
29 | spipConfig = ./spip_mes_options.php; | ||
30 | }; | ||
31 | }; | ||
32 | in app | ||