diff options
Diffstat (limited to 'pkgs/webapps/yourls/default.nix')
-rw-r--r-- | pkgs/webapps/yourls/default.nix | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/pkgs/webapps/yourls/default.nix b/pkgs/webapps/yourls/default.nix deleted file mode 100644 index d940c54..0000000 --- a/pkgs/webapps/yourls/default.nix +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | { yourls_config ? "/etc/yourls/config.php", mylibs, callPackage, lib, stdenv }: | ||
2 | let | ||
3 | pluginNames = [ "ldap" ]; | ||
4 | allPlugins = lib.attrsets.genAttrs pluginNames | ||
5 | (name: callPackage (./plugins + "/${name}") { inherit mylibs; }); | ||
6 | toPassthru = pkg: plugins: { | ||
7 | inherit plugins allPlugins; | ||
8 | withPlugins = withPlugins pkg; | ||
9 | }; | ||
10 | withPlugins = pkg: toPlugins: | ||
11 | let | ||
12 | plugins = toPlugins allPlugins; | ||
13 | toInstallPlugin = n: "ln -s ${n} $out/user/plugins/${n.pluginName}"; | ||
14 | newYourls = pkg.overrideAttrs(old: { | ||
15 | installPhase = old.installPhase + "\n" + builtins.concatStringsSep "\n" (map toInstallPlugin plugins); | ||
16 | passthru = toPassthru newYourls (pkg.plugins ++ plugins); | ||
17 | }); | ||
18 | in newYourls; | ||
19 | package = stdenv.mkDerivation (mylibs.fetchedGithub ./yourls.json // rec { | ||
20 | installPhase = '' | ||
21 | mkdir -p $out | ||
22 | cp -a */ *.php $out/ | ||
23 | cp sample-robots.txt $out/robots.txt | ||
24 | ln -sf ${yourls_config} $out/includes/config.php | ||
25 | ''; | ||
26 | passthru = toPassthru package []; | ||
27 | }); | ||
28 | in package | ||