2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2021-01-05 17:05:55 +00:00
|
|
|
, callPackage
|
|
|
|
, python27Packages
|
|
|
|
, installShellFiles
|
2021-09-26 12:46:18 +00:00
|
|
|
, rSrc
|
|
|
|
, version
|
|
|
|
, oildev
|
|
|
|
, binlore
|
2021-01-05 17:05:55 +00:00
|
|
|
}:
|
2021-09-26 12:46:18 +00:00
|
|
|
|
2021-01-05 17:05:55 +00:00
|
|
|
python27Packages.buildPythonApplication {
|
|
|
|
pname = "resholve";
|
|
|
|
inherit version;
|
|
|
|
src = rSrc;
|
|
|
|
format = "other";
|
2021-09-26 12:46:18 +00:00
|
|
|
dontBuild = true;
|
2021-01-05 17:05:55 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
propagatedBuildInputs = [ oildev python27Packages.configargparse ];
|
2021-01-05 17:05:55 +00:00
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
for file in resholve; do
|
|
|
|
substituteInPlace $file --subst-var-by version ${version}
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm755 resholve $out/bin/resholve
|
|
|
|
installManPage resholve.1
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
# Do not propagate Python; may be obsoleted by nixos/nixpkgs#102613
|
|
|
|
# for context on why, see abathur/resholve#20
|
|
|
|
postFixup = ''
|
|
|
|
rm $out/nix-support/propagated-build-inputs
|
|
|
|
'';
|
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
passthru.tests = callPackage ./test.nix { inherit rSrc; inherit binlore; };
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-01-05 17:05:55 +00:00
|
|
|
description = "Resolve external shell-script dependencies";
|
|
|
|
homepage = "https://github.com/abathur/resholve";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ abathur ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|