aboutsummaryrefslogtreecommitdiff
path: root/pkgs/webapps
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/webapps')
-rw-r--r--pkgs/webapps/default.nix8
-rw-r--r--pkgs/webapps/yourls/default.nix24
-rw-r--r--pkgs/webapps/yourls/plugins/ldap/default.nix8
-rw-r--r--pkgs/webapps/yourls/plugins/ldap/ldap.json15
-rw-r--r--pkgs/webapps/yourls/yourls.json15
5 files changed, 70 insertions, 0 deletions
diff --git a/pkgs/webapps/default.nix b/pkgs/webapps/default.nix
index 1dde9ca..f9ecd4f 100644
--- a/pkgs/webapps/default.nix
+++ b/pkgs/webapps/default.nix
@@ -49,4 +49,12 @@ rec {
49 49
50 phpldapadmin = callPackage ./phpldapadmin {}; 50 phpldapadmin = callPackage ./phpldapadmin {};
51 rompr = callPackage ./rompr { inherit mylibs; }; 51 rompr = callPackage ./rompr { inherit mylibs; };
52
53 yourls = callPackage ./yourls { inherit mylibs; };
54 yourls-with-plugins = yourls.withPlugins (builtins.attrValues yourls-plugins);
55 yourls-plugins = let
56 names = [ "ldap" ];
57 in
58 lib.attrsets.genAttrs names
59 (name: callPackage (./yourls/plugins + "/${name}") { inherit mylibs; });
52} 60}
diff --git a/pkgs/webapps/yourls/default.nix b/pkgs/webapps/yourls/default.nix
new file mode 100644
index 0000000..cc880cd
--- /dev/null
+++ b/pkgs/webapps/yourls/default.nix
@@ -0,0 +1,24 @@
1{ yourls_config ? "/etc/yourls/config.php", mylibs, stdenv }:
2let
3 withPlugins = plugins: package.overrideAttrs(old: {
4 name = "${old.name}-with-plugins";
5 installPhase = old.installPhase +
6 builtins.concatStringsSep "\n" (
7 map (value: "ln -s ${value} $out/user/plugins/${value.pluginName}") plugins
8 );
9 passthru.plugins = plugins;
10 passthru.withPlugins = morePlugins: old.withPlugins (morePlugins ++ plugins);
11 });
12 package = stdenv.mkDerivation (mylibs.fetchedGithub ./yourls.json // rec {
13 installPhase = ''
14 mkdir -p $out
15 cp -a */ *.php $out/
16 cp sample-robots.txt $out/robots.txt
17 ln -sf ${yourls_config} $out/includes/config.php
18 '';
19 passthru = {
20 plugins = [];
21 inherit withPlugins;
22 };
23 });
24in package
diff --git a/pkgs/webapps/yourls/plugins/ldap/default.nix b/pkgs/webapps/yourls/plugins/ldap/default.nix
new file mode 100644
index 0000000..01dc6fb
--- /dev/null
+++ b/pkgs/webapps/yourls/plugins/ldap/default.nix
@@ -0,0 +1,8 @@
1{ stdenv, mylibs }:
2stdenv.mkDerivation (mylibs.fetchedGithub ./ldap.json // rec {
3 installPhase = ''
4 mkdir -p $out
5 cp plugin.php $out
6 '';
7 passthru.pluginName = "ldap";
8})
diff --git a/pkgs/webapps/yourls/plugins/ldap/ldap.json b/pkgs/webapps/yourls/plugins/ldap/ldap.json
new file mode 100644
index 0000000..9411e4a
--- /dev/null
+++ b/pkgs/webapps/yourls/plugins/ldap/ldap.json
@@ -0,0 +1,15 @@
1{
2 "tag": "2a3cb03-master",
3 "meta": {
4 "name": "yourls-ldap-plugin",
5 "url": "https://github.com/k3a/yourls-ldap-plugin",
6 "branch": "master"
7 },
8 "github": {
9 "owner": "k3a",
10 "repo": "yourls-ldap-plugin",
11 "rev": "2a3cb0334b8a6b81b284a7196e614bbd2b2b1615",
12 "sha256": "0cchbnli77d295lzf7kjmn4dcxj2bmdqa9qc3f8l8qgmp4n5n0gh",
13 "fetchSubmodules": true
14 }
15}
diff --git a/pkgs/webapps/yourls/yourls.json b/pkgs/webapps/yourls/yourls.json
new file mode 100644
index 0000000..0a79b18
--- /dev/null
+++ b/pkgs/webapps/yourls/yourls.json
@@ -0,0 +1,15 @@
1{
2 "tag": "1.7.3",
3 "meta": {
4 "name": "yourls",
5 "url": "https://github.com/YOURLS/YOURLS",
6 "branch": "refs/tags/1.7.3"
7 },
8 "github": {
9 "owner": "YOURLS",
10 "repo": "YOURLS",
11 "rev": "077018822d3594229daa8343310d0b40804b9ddc",
12 "sha256": "1av6h619rwqn0yn0kjn2s2h3gmrhmxaaa9hd5ns4ralxgg731imd",
13 "fetchSubmodules": true
14 }
15}