liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

default.nix (588B)


      1 {
      2   lua,
      3   fetchFromGitHub,
      4   libmnl,
      5 }:
      6 let
      7   pname = "netlink";
      8 in
      9 lua.pkgs.buildLuaPackage {
     10   inherit pname;
     11   version = "0.1.1-1";
     12 
     13   buildInputs = [ libmnl ];
     14 
     15   src = fetchFromGitHub {
     16     repo = "lua-netlink";
     17     owner = "chris2511";
     18     rev = "41e5ced77a5d68239988ac71ca9476ad496dc047";
     19     hash = "sha256-z4EK2sKxTdDShhD8e5Z6IeZyQduwOqbXeXmkMhsOTIU=";
     20   };
     21 
     22   buildPhase = "$CC -shared -l mnl -l lua -DVERSION=\\\"1.1.0\\\" -o netlink.so src/*.c";
     23 
     24   installPhase = ''
     25     mkdir -p "$out/lib/lua/${lua.luaversion}"
     26     cp  netlink.so "$out/lib/lua/${lua.luaversion}/"
     27   '';
     28 
     29 }