nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at 22.05 61 lines 1.6 kB view raw
1{ lib 2, stdenv 3, callPackage 4, python27Packages 5, installShellFiles 6, rSrc 7, version 8, oildev 9, binlore 10, resholve-utils 11}: 12 13python27Packages.buildPythonApplication { 14 pname = "resholve"; 15 inherit version; 16 src = rSrc; 17 18 nativeBuildInputs = [ installShellFiles ]; 19 20 propagatedBuildInputs = [ 21 oildev 22 /* 23 Disable configargparse's tests on aarch64-darwin. 24 Several of py27 scandir's tests fail on aarch64-darwin. Chain: 25 configargparse -> pytest-check-hook -> pytest -> pathlib2 -> scandir 26 TODO: drop if https://github.com/NixOS/nixpkgs/issues/156807 resolves? 27 */ 28 (python27Packages.configargparse.overridePythonAttrs (old: { 29 doCheck = stdenv.hostPlatform.system != "aarch64-darwin"; 30 })) 31 ]; 32 33 patchPhase = '' 34 for file in setup.cfg _resholve/version.py; do 35 substituteInPlace $file --subst-var-by version ${version} 36 done 37 ''; 38 39 postInstall = '' 40 installManPage resholve.1 41 ''; 42 43 # Do not propagate Python; may be obsoleted by nixos/nixpkgs#102613 44 # for context on why, see abathur/resholve#20 45 postFixup = '' 46 rm $out/nix-support/propagated-build-inputs 47 ''; 48 49 passthru = { 50 inherit (resholve-utils) mkDerivation phraseSolution writeScript writeScriptBin; 51 tests = callPackage ./test.nix { inherit rSrc binlore; }; 52 }; 53 54 meta = with lib; { 55 description = "Resolve external shell-script dependencies"; 56 homepage = "https://github.com/abathur/resholve"; 57 license = with licenses; [ mit ]; 58 maintainers = with maintainers; [ abathur ]; 59 platforms = platforms.all; 60 }; 61}