Skip to content

Commit

Permalink
wp4nix: Use makeWrapper instead of patching
Browse files Browse the repository at this point in the history
  • Loading branch information
onny committed Oct 6, 2022
1 parent 2d435bf commit 0be516f
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions pkgs/development/tools/wp4nix/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{ lib, buildGoModule, fetchFromGitLab, nix, subversion }:
{ lib
, buildGoModule
, fetchFromGitLab
, nix
, subversion
, makeWrapper
}:

buildGoModule rec {
pname = "wp4nix";
Expand All @@ -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; {
Expand Down

0 comments on commit 0be516f

Please sign in to comment.