summaryrefslogtreecommitdiff
path: root/custom/luaSha2.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-09-30 22:05:26 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2015-09-30 22:05:26 +0200
commite58f7872ea9dafe383f0054efdca8535016e9541 (patch)
tree6320a9b8bc843282894b3d2c08228689a9a05e82 /custom/luaSha2.nix
parent508e9c0abde67e42a7dffae4d19475439f774d6b (diff)
downloadnixos-e58f7872ea9dafe383f0054efdca8535016e9541.tar
nixos-e58f7872ea9dafe383f0054efdca8535016e9541.tar.gz
nixos-e58f7872ea9dafe383f0054efdca8535016e9541.tar.bz2
nixos-e58f7872ea9dafe383f0054efdca8535016e9541.tar.xz
nixos-e58f7872ea9dafe383f0054efdca8535016e9541.zip
alias auth in prosody
Diffstat (limited to 'custom/luaSha2.nix')
-rw-r--r--custom/luaSha2.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/custom/luaSha2.nix b/custom/luaSha2.nix
new file mode 100644
index 00000000..d9b603f8
--- /dev/null
+++ b/custom/luaSha2.nix
@@ -0,0 +1,21 @@
1{ stdenv
2, fetchurl
3, pkgs
4}:
5
6let
7 lua = pkgs.lua51Packages.lua;
8in pkgs.lua51Packages.buildLuaPackage {
9 name = "luaSha2";
10 src = fetchurl {
11 url = "https://sha2.googlecode.com/archive/02bd4bfdc8062c7e1ae51c5a72906efc0a6375ee.tar.gz";
12 sha256 = "18v0pn10cs6133jzm80sj2aw0ycpls150k9p0gplagap6xhzp6j2";
13 };
14 buildPhase = ''
15 gcc -L${lua}/lib -I$LUA_INC -I. sha2.c sha2lib.c -fPIC -DSHA2_USE_INTTYPES_H -DBYTE_ORDER -DLITTLE_ENDIAN -llua -shared -o sha2.so
16 '';
17 installPhase = ''
18 mkdir -p $out/lib/lua/${lua.luaversion}
19 install sha2.so $out/lib/lua/${lua.luaversion}
20 '';
21}