Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at fix-function-merge 44 lines 1.0 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchgit, 5 cmake, 6 linux-pam, 7 substituteAll, 8 enablePython ? false, 9 python ? null, 10}: 11 12assert enablePython -> python != null; 13 14stdenv.mkDerivation rec { 15 pname = "libpam-wrapper"; 16 version = "1.1.5"; 17 18 src = fetchgit { 19 url = "git://git.samba.org/pam_wrapper.git"; 20 rev = "pam_wrapper-${version}"; 21 hash = "sha256-AtfkiCUvCxUfll6lOlbMyy5AhS5R2BGF1+ecC1VuwzM="; 22 }; 23 24 patches = [ 25 (substituteAll { 26 src = ./python.patch; 27 siteDir = lib.optionalString enablePython python.sitePackages; 28 includeDir = lib.optionalString enablePython "include/${python.libPrefix}"; 29 }) 30 ]; 31 32 nativeBuildInputs = [ cmake ] ++ lib.optionals enablePython [ python ]; 33 34 # We must use linux-pam, using openpam will result in broken fprintd. 35 buildInputs = [ linux-pam ]; 36 37 meta = with lib; { 38 description = "Wrapper for testing PAM modules"; 39 homepage = "https://cwrap.org/pam_wrapper.html"; 40 license = licenses.gpl3Plus; 41 maintainers = [ ]; 42 platforms = platforms.linux; 43 }; 44}