diff options
Diffstat (limited to 'custom')
-rw-r--r-- | custom/luaPam.nix | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/custom/luaPam.nix b/custom/luaPam.nix new file mode 100644 index 00000000..f0c93e4f --- /dev/null +++ b/custom/luaPam.nix | |||
@@ -0,0 +1,26 @@ | |||
1 | { stdenv | ||
2 | , pkgs | ||
3 | , fetchgit | ||
4 | }: | ||
5 | |||
6 | let | ||
7 | lua = pkgs.luaPackages.lua; | ||
8 | in pkgs.luaPackages.buildLuaPackage { | ||
9 | name = "lua-pam"; | ||
10 | buildInputs = (with pkgs; [ pam ]); | ||
11 | src = fetchgit { | ||
12 | url = "https://github.com/devurandom/lua-pam"; | ||
13 | rev = "3818ee6346a976669d74a5cbc2a83ad2585c5953"; | ||
14 | sha256 = "1aci3psyxwxbls93w5b4vdhnrrp3w94i97dl8qrmjgigzbjszwvr"; | ||
15 | }; | ||
16 | preBuild = '' | ||
17 | makeFlagsArray=( | ||
18 | LUA_CPPFLAGS="-I${lua}/include -L${lua}/lib" | ||
19 | LUA_LIBS="-L${lua}/lib -llua" | ||
20 | ); | ||
21 | ''; | ||
22 | installPhase = '' | ||
23 | mkdir -p $out/lib/lua/${lua.luaversion} | ||
24 | install pam.so $out/lib/lua/${lua.luaversion}/ | ||
25 | ''; | ||
26 | } | ||