diff --git a/pkgs/development/tools/wp4nix/default.nix b/pkgs/development/tools/wp4nix/default.nix index 967459e91b74..a97ae7737064 100644 --- a/pkgs/development/tools/wp4nix/default.nix +++ b/pkgs/development/tools/wp4nix/default.nix @@ -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; {