wp4nix: Use makeWrapper instead of patching
This commit is contained in:
parent
d6c658f34f
commit
550e3ff156
1 changed files with 14 additions and 4 deletions
|
@ -1,4 +1,10 @@
|
||||||
{ lib, buildGoModule, fetchFromGitLab, nix, subversion }:
|
{ lib
|
||||||
|
, buildGoModule
|
||||||
|
, fetchFromGitLab
|
||||||
|
, nix
|
||||||
|
, subversion
|
||||||
|
, makeWrapper
|
||||||
|
}:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "wp4nix";
|
pname = "wp4nix";
|
||||||
|
@ -14,9 +20,13 @@ buildGoModule rec {
|
||||||
|
|
||||||
vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
|
vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
|
||||||
|
|
||||||
postPatch = ''
|
nativeBuildInputs = [
|
||||||
substituteInPlace main.go --replace nix-hash ${nix}/bin/nix-hash
|
makeWrapper
|
||||||
substituteInPlace svn.go --replace '"svn"' '"${subversion}/bin/svn"'
|
];
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
wrapProgram $out/bin/wp4nix \
|
||||||
|
--prefix PATH : ${lib.makeBinPath [ nix subversion ]}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
Loading…
Reference in a new issue