Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 24.05-beta 79 lines 1.8 kB view raw
1{ lib 2, stdenv 3, callPackage 4, python27 5, fetchFromGitHub 6, installShellFiles 7, rSrc 8, version 9, oildev 10, configargparse 11, gawk 12, binlore 13, resholve 14, resholve-utils 15}: 16 17let 18 sedparse = python27.pkgs.buildPythonPackage rec { 19 pname = "sedparse"; 20 version = "0.1.2"; 21 src = fetchFromGitHub { 22 owner = "aureliojargas"; 23 repo = "sedparse"; 24 rev = "0.1.2"; 25 hash = "sha256-Q17A/oJ3GZbdSK55hPaMdw85g43WhTW9tuAuJtDfHHU="; 26 }; 27 }; 28 29in python27.pkgs.buildPythonApplication { 30 pname = "resholve"; 31 inherit version; 32 src = rSrc; 33 34 nativeBuildInputs = [ installShellFiles ]; 35 36 propagatedBuildInputs = [ 37 oildev 38 configargparse 39 sedparse 40 ]; 41 42 makeWrapperArgs = [ 43 "--prefix PATH : ${lib.makeBinPath [ gawk ]}" 44 ]; 45 46 postPatch = '' 47 for file in setup.cfg _resholve/version.py; do 48 substituteInPlace $file --subst-var-by version ${version} 49 done 50 ''; 51 52 postInstall = '' 53 installManPage resholve.1 54 ''; 55 56 # Do not propagate Python; may be obsoleted by nixos/nixpkgs#102613 57 # for context on why, see abathur/resholve#20 58 postFixup = '' 59 rm $out/nix-support/propagated-build-inputs 60 ''; 61 62 passthru = { 63 inherit (resholve-utils) mkDerivation phraseSolution writeScript writeScriptBin; 64 tests = callPackage ./test.nix { inherit rSrc binlore python27 resholve; }; 65 }; 66 67 meta = with lib; { 68 description = "Resolve external shell-script dependencies"; 69 homepage = "https://github.com/abathur/resholve"; 70 license = with licenses; [ mit ]; 71 maintainers = with maintainers; [ abathur ]; 72 platforms = platforms.all; 73 knownVulnerabilities = [ '' 74 resholve depends on python27 (EOL). While it's safe to 75 run on trusted input in the build sandbox, you should 76 avoid running it on untrusted input. 77 '' ]; 78 }; 79}