summaryrefslogtreecommitdiff
path: root/custom/luaPam.nix
blob: 24fab5588b3086702483c1a64fd5035017055674 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ stdenv
, pkgs
, fetchgit
}:

let
  lua = pkgs.lua51Packages.lua;
in pkgs.lua51Packages.buildLuaPackage {
  name = "lua-pam";
  buildInputs = (with pkgs; [ pam ]);
  src = fetchgit {
    url = "https://github.com/devurandom/lua-pam";
    rev = "3818ee6346a976669d74a5cbc2a83ad2585c5953";
    sha256 = "1aci3psyxwxbls93w5b4vdhnrrp3w94i97dl8qrmjgigzbjszwvr";
  };
  preBuild = ''
    makeFlagsArray=(
    LUA_CPPFLAGS="-I${lua}/include -L${lua}/lib"
    LUA_LIBS="-L${lua}/lib -llua"
    );
  '';
  installPhase = ''
    mkdir -p $out/lib/lua/${lua.luaversion}
    install pam.so $out/lib/lua/${lua.luaversion}/
  '';
}