Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.11 48 lines 1.1 kB view raw
1{ lib 2, callPackage 3, python27Packages 4, installShellFiles 5, rSrc 6, version 7, oildev 8, binlore 9}: 10 11python27Packages.buildPythonApplication { 12 pname = "resholve"; 13 inherit version; 14 src = rSrc; 15 format = "other"; 16 dontBuild = true; 17 18 nativeBuildInputs = [ installShellFiles ]; 19 20 propagatedBuildInputs = [ oildev python27Packages.configargparse ]; 21 22 patchPhase = '' 23 for file in resholve; do 24 substituteInPlace $file --subst-var-by version ${version} 25 done 26 ''; 27 28 installPhase = '' 29 install -Dm755 resholve $out/bin/resholve 30 installManPage resholve.1 31 ''; 32 33 # Do not propagate Python; may be obsoleted by nixos/nixpkgs#102613 34 # for context on why, see abathur/resholve#20 35 postFixup = '' 36 rm $out/nix-support/propagated-build-inputs 37 ''; 38 39 passthru.tests = callPackage ./test.nix { inherit rSrc; inherit binlore; }; 40 41 meta = with lib; { 42 description = "Resolve external shell-script dependencies"; 43 homepage = "https://github.com/abathur/resholve"; 44 license = with licenses; [ mit ]; 45 maintainers = with maintainers; [ abathur ]; 46 platforms = platforms.all; 47 }; 48}