@@ -1,4 +1,4 @@
1−{ clipnotify, makeWrapper, xsel, dmenu, utillinux, gawk, stdenv, fetchFromGitHub, lib }:
1+{ clipnotify, makeWrapper, xsel, dmenu, utillinux, gawk, stdenv, fetchFromGitHub, fetchpatch, lib }:
22let
33 runtimePath = lib.makeBinPath [ clipnotify xsel dmenu utillinux gawk ];
44in
@@ -12,11 +12,15 @@ stdenv.mkDerivation rec {
1212 rev = version;
1313 sha256 = "0ddj5xcwrdb2qvrndvhv8j6swcqc8dvv5i00pqk35rfk5mrl4hwv";
1414 };
15−
16− postPatch = ''
17− substituteInPlace ./Makefile --replace /usr "$out"
18− '';
19−
15+
16+ patches = [
17+ (fetchpatch {
18+ url = "https://github.com/cdown/clipmenu/commit/443b58583ef216e2405e4a38d401f7c36386d21e.patch";
19+ sha256 = "12m4rpw7jbr31c919llbsmn8dcf7yh9aijln4iym6h2lylzqzzdz";
20+ })
21+ ];
22+
23+ makeFlags = [ "PREFIX=$(out)" ];
2024 buildInputs = [ makeWrapper ];
2125 nativeBuildInputs = [ xsel clipnotify ];
2226