Merge pull request #248690 from trofi/duperemove-encode-lscpu

duperemove: encode absolute path to `lscpu`
This commit is contained in:
Artturi 2023-08-13 06:44:38 +03:00 committed by GitHub
commit 25214c5e8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,6 @@
{ lib, stdenv, fetchFromGitHub, libgcrypt
, pkg-config, glib, linuxHeaders ? stdenv.cc.libc.linuxHeaders, sqlite }:
, pkg-config, glib, linuxHeaders ? stdenv.cc.libc.linuxHeaders, sqlite
, util-linux }:
stdenv.mkDerivation rec {
pname = "duperemove";
@ -12,6 +13,11 @@ stdenv.mkDerivation rec {
sha256 = "sha256-WjUM52IqMDvBzeGHo7p4JcvMO5iPWPVOr8GJ3RSsnUs=";
};
postPatch = ''
substituteInPlace util.c --replace \
"lscpu" "${lib.getBin util-linux}/bin/lscpu"
'';
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libgcrypt glib linuxHeaders sqlite ];