about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/security/mktemp/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/security/mktemp/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/security/mktemp/default.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/security/mktemp/default.nix b/nixpkgs/pkgs/tools/security/mktemp/default.nix
new file mode 100644
index 000000000000..71bdd3af55de
--- /dev/null
+++ b/nixpkgs/pkgs/tools/security/mktemp/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchurl, groff }:
+
+stdenv.mkDerivation {
+  name = "mktemp-1.7";
+
+  # Have `configure' avoid `/usr/bin/nroff' in non-chroot builds.
+  NROFF = "${groff}/bin/nroff";
+
+  # Don't use "install -s"
+  postPatch = ''
+    substituteInPlace Makefile.in --replace " 0555 -s " " 0555 "
+  '';
+
+  src = fetchurl {
+    url = ftp://ftp.mktemp.org/pub/mktemp/mktemp-1.7.tar.gz;
+    sha256 = "0x969152znxxjbj7387xb38waslr4yv6bnj5jmhb4rpqxphvk54f";
+  };
+
+  meta = with stdenv.lib; {
+    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;
+  };
+}