Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 76 lines 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 pass, 5 fetchFromGitHub, 6 python3, 7 gnupg, 8}: 9 10python3.pkgs.buildPythonApplication rec { 11 pname = "pass-audit"; 12 version = "1.2"; 13 pyproject = true; 14 15 src = fetchFromGitHub { 16 owner = "roddhjav"; 17 repo = "pass-audit"; 18 rev = "v${version}"; 19 hash = "sha256-xigP8LxRXITLF3X21zhWx6ooFNSTKGv46yFSt1dd4vs="; 20 }; 21 22 patches = [ 23 ./0001-Set-base-to-an-empty-value.patch 24 ./0002-Fix-audit.bash-setup.patch 25 ]; 26 27 postPatch = '' 28 substituteInPlace audit.bash \ 29 --replace-fail python3 "${lib.getExe python3}" 30 rm Makefile 31 patchShebangs audit.bash 32 ''; 33 34 outputs = [ 35 "out" 36 "man" 37 ]; 38 39 build-system = with python3.pkgs; [ setuptools ]; 40 dependencies = with python3.pkgs; [ 41 requests 42 setuptools 43 zxcvbn 44 ]; 45 46 # Tests freeze on darwin with: pass-audit-1.1 (checkPhase): EOFError 47 doCheck = !stdenv.hostPlatform.isDarwin; 48 nativeCheckInputs = [ 49 python3.pkgs.green 50 pass 51 gnupg 52 ]; 53 checkPhase = '' 54 python3 -m green -q 55 ''; 56 57 postInstall = '' 58 mkdir -p $out/lib/password-store/extensions 59 install -m777 audit.bash $out/lib/password-store/extensions/audit.bash 60 cp -r share $out/ 61 buildPythonPath "$out $dependencies" 62 wrapProgram $out/lib/password-store/extensions/audit.bash \ 63 --prefix PYTHONPATH : "$PYTHONPATH" \ 64 --run "export COMMAND" 65 ''; 66 67 pythonImportsCheck = [ "pass_audit" ]; 68 69 meta = with lib; { 70 description = "Pass extension for auditing your password repository"; 71 homepage = "https://github.com/roddhjav/pass-audit"; 72 license = licenses.gpl3Plus; 73 platforms = platforms.unix; 74 maintainers = with maintainers; [ ma27 ]; 75 }; 76}