wp4nix: Use makeWrapper instead of patching

This commit is contained in:
Jonas Heinrich 2022-09-25 00:49:29 +02:00 committed by Yt
parent d6c658f34f
commit 550e3ff156

View file

@ -1,4 +1,10 @@
{ lib, buildGoModule, fetchFromGitLab, nix, subversion }:
{ lib
, buildGoModule
, fetchFromGitLab
, nix
, subversion
, makeWrapper
}:
buildGoModule rec {
pname = "wp4nix";
@ -14,9 +20,13 @@ buildGoModule rec {
vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
postPatch = ''
substituteInPlace main.go --replace nix-hash ${nix}/bin/nix-hash
substituteInPlace svn.go --replace '"svn"' '"${subversion}/bin/svn"'
nativeBuildInputs = [
makeWrapper
];
postInstall = ''
wrapProgram $out/bin/wp4nix \
--prefix PATH : ${lib.makeBinPath [ nix subversion ]}
'';
meta = with lib; {