diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-06 00:40:09 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-05-06 00:40:09 +0200 |
commit | f5efae0f8c4c53798f8f9fc88c5f92f38a223320 (patch) | |
tree | 804bfea19e8b3ef112a64cf358983bc1817a9eea | |
parent | 3a1461cf44102e6cd8cdee5e0f1ff1d7992894ad (diff) | |
download | Nix-f5efae0f8c4c53798f8f9fc88c5f92f38a223320.tar.gz Nix-f5efae0f8c4c53798f8f9fc88c5f92f38a223320.tar.zst Nix-f5efae0f8c4c53798f8f9fc88c5f92f38a223320.zip |
Move phpldapadmin to pkgs
-rw-r--r-- | nixops/modules/websites/tools/tools/default.nix | 1 | ||||
-rw-r--r-- | nixops/modules/websites/tools/tools/ldap.nix | 26 | ||||
-rw-r--r-- | pkgs/webapps/default.nix | 6 | ||||
-rw-r--r-- | pkgs/webapps/phpldapadmin/default.nix | 24 | ||||
-rw-r--r-- | pkgs/webapps/phpldapadmin/ldap-align-button.patch (renamed from nixops/modules/websites/tools/tools/ldap-align-button.patch) | 0 | ||||
-rw-r--r-- | pkgs/webapps/phpldapadmin/ldap-disable-mcrypt.patch (renamed from nixops/modules/websites/tools/tools/ldap-disable-mcrypt.patch) | 0 | ||||
-rw-r--r-- | pkgs/webapps/phpldapadmin/ldap-php5_5.patch (renamed from nixops/modules/websites/tools/tools/ldap-php5_5.patch) | 0 | ||||
-rw-r--r-- | pkgs/webapps/phpldapadmin/ldap-php7_2.patch (renamed from nixops/modules/websites/tools/tools/ldap-php7_2.patch) | 0 | ||||
-rw-r--r-- | pkgs/webapps/phpldapadmin/ldap-sort-in-templates.patch (renamed from nixops/modules/websites/tools/tools/ldap-sort-in-templates.patch) | 0 |
9 files changed, 33 insertions, 24 deletions
diff --git a/nixops/modules/websites/tools/tools/default.nix b/nixops/modules/websites/tools/tools/default.nix index 827c563..e872224 100644 --- a/nixops/modules/websites/tools/tools/default.nix +++ b/nixops/modules/websites/tools/tools/default.nix | |||
@@ -33,6 +33,7 @@ let | |||
33 | inherit (mylibs) fetchedGithub; | 33 | inherit (mylibs) fetchedGithub; |
34 | }; | 34 | }; |
35 | ldap = pkgs.callPackage ./ldap.nix { | 35 | ldap = pkgs.callPackage ./ldap.nix { |
36 | inherit (pkgs.webapps) phpldapadmin; | ||
36 | env = myconfig.env.tools.phpldapadmin; | 37 | env = myconfig.env.tools.phpldapadmin; |
37 | }; | 38 | }; |
38 | 39 | ||
diff --git a/nixops/modules/websites/tools/tools/ldap.nix b/nixops/modules/websites/tools/tools/ldap.nix index 7c26b61..8ee39f6 100644 --- a/nixops/modules/websites/tools/tools/ldap.nix +++ b/nixops/modules/websites/tools/tools/ldap.nix | |||
@@ -1,4 +1,4 @@ | |||
1 | { lib, php, env, writeText, stdenv, optipng, fetchurl }: | 1 | { lib, php, env, writeText, phpldapadmin }: |
2 | rec { | 2 | rec { |
3 | keys = [{ | 3 | keys = [{ |
4 | dest = "webapps/tools-ldap"; | 4 | dest = "webapps/tools-ldap"; |
@@ -25,29 +25,7 @@ rec { | |||
25 | $servers->setValue('login','fallback_dn',true); | 25 | $servers->setValue('login','fallback_dn',true); |
26 | ''; | 26 | ''; |
27 | }]; | 27 | }]; |
28 | webRoot = stdenv.mkDerivation rec { | 28 | webRoot = phpldapadmin.override { config = "/var/secrets/webapps/tools-ldap"; }; |
29 | version = "1.2.3"; | ||
30 | name = "phpldapadmin-${version}"; | ||
31 | src = fetchurl { | ||
32 | url = "https://downloads.sourceforge.net/project/phpldapadmin/phpldapadmin-php5/${version}/${name}.tgz"; | ||
33 | sha256 = "0n7dhp2a7n1krmnik3pb969jynsmhghmxviivnckifkprv1zijmf"; | ||
34 | }; | ||
35 | patches = [ | ||
36 | ./ldap-php5_5.patch | ||
37 | ./ldap-disable-mcrypt.patch | ||
38 | ./ldap-php7_2.patch | ||
39 | ./ldap-sort-in-templates.patch | ||
40 | ./ldap-align-button.patch | ||
41 | ]; | ||
42 | buildInputs = [ optipng ]; | ||
43 | buildPhase = '' | ||
44 | find -name '*.png' -exec optipng -quiet -force -fix {} \; | ||
45 | ''; | ||
46 | installPhase = '' | ||
47 | cp -a . $out | ||
48 | ln -sf /var/secrets/webapps/tools-ldap $out/config/config.php | ||
49 | ''; | ||
50 | }; | ||
51 | apache = rec { | 29 | apache = rec { |
52 | user = "wwwrun"; | 30 | user = "wwwrun"; |
53 | group = "wwwrun"; | 31 | group = "wwwrun"; |
diff --git a/pkgs/webapps/default.nix b/pkgs/webapps/default.nix index da38f5f..7e04e8d 100644 --- a/pkgs/webapps/default.nix +++ b/pkgs/webapps/default.nix | |||
@@ -1,10 +1,14 @@ | |||
1 | { callPackage, mylibs, lib }: | 1 | { callPackage, mylibs, lib }: |
2 | rec { | 2 | rec { |
3 | diaspora = callPackage ./diaspora { inherit mylibs; }; | 3 | diaspora = callPackage ./diaspora { inherit mylibs; }; |
4 | |||
4 | mastodon = callPackage ./mastodon { inherit mylibs; }; | 5 | mastodon = callPackage ./mastodon { inherit mylibs; }; |
6 | |||
5 | awl = callPackage ./awl {}; | 7 | awl = callPackage ./awl {}; |
6 | davical = callPackage ./davical {}; | 8 | davical = callPackage ./davical {}; |
9 | |||
7 | infcloud = callPackage ./infcloud {}; | 10 | infcloud = callPackage ./infcloud {}; |
11 | |||
8 | nextcloud = callPackage ./nextcloud {}; | 12 | nextcloud = callPackage ./nextcloud {}; |
9 | nextcloud-apps = let | 13 | nextcloud-apps = let |
10 | names = [ | 14 | names = [ |
@@ -17,4 +21,6 @@ rec { | |||
17 | in | 21 | in |
18 | lib.attrsets.genAttrs names | 22 | lib.attrsets.genAttrs names |
19 | (name: callPackage (./nextcloud/apps + "/${name}.nix") { buildApp = nextcloud.buildApp; }); | 23 | (name: callPackage (./nextcloud/apps + "/${name}.nix") { buildApp = nextcloud.buildApp; }); |
24 | |||
25 | phpldapadmin = callPackage ./phpldapadmin {}; | ||
20 | } | 26 | } |
diff --git a/pkgs/webapps/phpldapadmin/default.nix b/pkgs/webapps/phpldapadmin/default.nix new file mode 100644 index 0000000..70fd19a --- /dev/null +++ b/pkgs/webapps/phpldapadmin/default.nix | |||
@@ -0,0 +1,24 @@ | |||
1 | { config ? "/etc/phpldapadmin/config.php", fetchurl, stdenv, optipng }: | ||
2 | stdenv.mkDerivation rec { | ||
3 | version = "1.2.3"; | ||
4 | name = "phpldapadmin-${version}"; | ||
5 | src = fetchurl { | ||
6 | url = "https://downloads.sourceforge.net/project/phpldapadmin/phpldapadmin-php5/${version}/${name}.tgz"; | ||
7 | sha256 = "0n7dhp2a7n1krmnik3pb969jynsmhghmxviivnckifkprv1zijmf"; | ||
8 | }; | ||
9 | patches = [ | ||
10 | ./ldap-php5_5.patch | ||
11 | ./ldap-disable-mcrypt.patch | ||
12 | ./ldap-php7_2.patch | ||
13 | ./ldap-sort-in-templates.patch | ||
14 | ./ldap-align-button.patch | ||
15 | ]; | ||
16 | buildInputs = [ optipng ]; | ||
17 | buildPhase = '' | ||
18 | find -name '*.png' -exec optipng -quiet -force -fix {} \; | ||
19 | ''; | ||
20 | installPhase = '' | ||
21 | cp -a . $out | ||
22 | ln -sf ${config} $out/config/config.php | ||
23 | ''; | ||
24 | } | ||
diff --git a/nixops/modules/websites/tools/tools/ldap-align-button.patch b/pkgs/webapps/phpldapadmin/ldap-align-button.patch index d9a5504..d9a5504 100644 --- a/nixops/modules/websites/tools/tools/ldap-align-button.patch +++ b/pkgs/webapps/phpldapadmin/ldap-align-button.patch | |||
diff --git a/nixops/modules/websites/tools/tools/ldap-disable-mcrypt.patch b/pkgs/webapps/phpldapadmin/ldap-disable-mcrypt.patch index 8bc4e7b..8bc4e7b 100644 --- a/nixops/modules/websites/tools/tools/ldap-disable-mcrypt.patch +++ b/pkgs/webapps/phpldapadmin/ldap-disable-mcrypt.patch | |||
diff --git a/nixops/modules/websites/tools/tools/ldap-php5_5.patch b/pkgs/webapps/phpldapadmin/ldap-php5_5.patch index 8545ad2..8545ad2 100644 --- a/nixops/modules/websites/tools/tools/ldap-php5_5.patch +++ b/pkgs/webapps/phpldapadmin/ldap-php5_5.patch | |||
diff --git a/nixops/modules/websites/tools/tools/ldap-php7_2.patch b/pkgs/webapps/phpldapadmin/ldap-php7_2.patch index 40ee055..40ee055 100644 --- a/nixops/modules/websites/tools/tools/ldap-php7_2.patch +++ b/pkgs/webapps/phpldapadmin/ldap-php7_2.patch | |||
diff --git a/nixops/modules/websites/tools/tools/ldap-sort-in-templates.patch b/pkgs/webapps/phpldapadmin/ldap-sort-in-templates.patch index 55a1974..55a1974 100644 --- a/nixops/modules/websites/tools/tools/ldap-sort-in-templates.patch +++ b/pkgs/webapps/phpldapadmin/ldap-sort-in-templates.patch | |||