diff options
Diffstat (limited to 'custom/prosody-modules.nix')
-rw-r--r-- | custom/prosody-modules.nix | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/custom/prosody-modules.nix b/custom/prosody-modules.nix new file mode 100644 index 00000000..3c103438 --- /dev/null +++ b/custom/prosody-modules.nix | |||
@@ -0,0 +1,20 @@ | |||
1 | { stdenv | ||
2 | , fetchhg | ||
3 | , modules ? [] | ||
4 | }: | ||
5 | |||
6 | let | ||
7 | copyModule = name: "cp -rv $src/${name}/* $out/;"; | ||
8 | concat = a: b: a + b; | ||
9 | head = '' | ||
10 | source $stdenv/setup | ||
11 | mkdir -p $out | ||
12 | ''; | ||
13 | in stdenv.mkDerivation { | ||
14 | name = "prosody-modules"; | ||
15 | src = fetchhg { | ||
16 | url = "http://hg.prosody.im/prosody-modules"; | ||
17 | sha256 = "0nsf1j2prc6ggajn7zz9h300msf6aajqqxhy396g7j834knj5fb2"; | ||
18 | }; | ||
19 | builder = builtins.toFile "builder.sh" (head + (builtins.foldl' concat "" (map copyModule modules))); | ||
20 | } | ||