datefudge: fix build w/glibc-2.31

https://hydra.nixos.org/build/122874972
This commit is contained in:
Maximilian Bosch 2020-06-26 14:38:19 +02:00
parent f95acb5cc6
commit 7193603c5f
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E

View File

@ -1,4 +1,4 @@
{ stdenv, fetchgit }:
{ stdenv, fetchgit, fetchpatch }:
stdenv.mkDerivation {
pname = "datefudge";
@ -10,15 +10,20 @@ stdenv.mkDerivation {
sha256 = "0r9g8v9xnv60hq3j20wqy34kyig3sc2pisjxl4irn7jjx85f1spv";
};
patchPhase = ''
patches = [
(fetchpatch {
url = "https://src.fedoraproject.org/rpms/datefudge/raw/master/f/datefudge_1.23-tz.patch";
sha256 = "19c2fvhm06wnp3059b0rnd7dqdchkan8iycjh8jk8y25j870zkvn";
})
];
postPatch = ''
substituteInPlace Makefile \
--replace "/usr" "/" \
--replace "-o root -g root" ""
substituteInPlace datefudge.sh \
--replace "@LIBDIR@" "$out/lib/"
'';
preInstallPhase = "mkdir -P $out/lib/datefudge";
'';
installFlags = [ "DESTDIR=$(out)" ];