2023-10-19 13:55:26 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, fetchpatch
|
|
|
|
, groff
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-22 07:53:02 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "mktemp";
|
|
|
|
version = "1.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
|
|
|
|
NROFF = "${groff}/bin/nroff";
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
patches = [
|
|
|
|
# Pull upstream fix for parallel install failures.
|
|
|
|
(fetchpatch {
|
|
|
|
name = "parallel-install.patch";
|
|
|
|
url = "https://www.mktemp.org/repos/mktemp/raw-rev/eb87d96ce8b7";
|
|
|
|
hash = "sha256-cJ/0pFj8tOkByUwhlMwLNSQgTHyAU8svEkjKWWwsNmY=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Don't use "install -s"
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile.in --replace " 0555 -s " " 0555 "
|
|
|
|
'';
|
|
|
|
|
|
|
|
src = fetchurl {
|
2021-08-22 07:53:02 +00:00
|
|
|
url = "ftp://ftp.mktemp.org/pub/mktemp/mktemp-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0x969152znxxjbj7387xb38waslr4yv6bnj5jmhb4rpqxphvk54f";
|
|
|
|
};
|
|
|
|
|
2023-10-19 13:55:26 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Simple tool to make temporary file handling in shells scripts safe and simple";
|
|
|
|
homepage = "https://www.mktemp.org";
|
|
|
|
license = licenses.isc;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|