about summary refs log tree commit diff
path: root/pkgs/tools/security
diff options
context:
space:
mode:
authorFrederik Rietdijk <freddyrietdijk@fridh.nl>2016-08-01 09:57:12 +0200
committerGitHub <noreply@github.com>2016-08-01 09:57:12 +0200
commit8f9326ffd8a75b0b807d62723f895e38b2e663bd (patch)
tree03bc67cecfdd425ce436c10d41afed4662dab14e /pkgs/tools/security
parentdbd856d7240b992fc45aedf6e2227f4028b72a5b (diff)
parentc8f2d8dae0f3a7511c708e4896502654361f4a67 (diff)
downloadnixlib-8f9326ffd8a75b0b807d62723f895e38b2e663bd.tar
nixlib-8f9326ffd8a75b0b807d62723f895e38b2e663bd.tar.gz
nixlib-8f9326ffd8a75b0b807d62723f895e38b2e663bd.tar.bz2
nixlib-8f9326ffd8a75b0b807d62723f895e38b2e663bd.tar.lz
nixlib-8f9326ffd8a75b0b807d62723f895e38b2e663bd.tar.xz
nixlib-8f9326ffd8a75b0b807d62723f895e38b2e663bd.tar.zst
nixlib-8f9326ffd8a75b0b807d62723f895e38b2e663bd.zip
Merge pull request #17323 from arpa2/hashslinger
Hash-slinger: init at  2.7.0
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r--pkgs/tools/security/hash-slinger/default.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/tools/security/hash-slinger/default.nix b/pkgs/tools/security/hash-slinger/default.nix
new file mode 100644
index 000000000000..9551c8e36db7
--- /dev/null
+++ b/pkgs/tools/security/hash-slinger/default.nix
@@ -0,0 +1,44 @@
+{ stdenv, fetchFromGitHub, pythonPackages, openssh, gnupg, unbound, libreswan }:
+
+stdenv.mkDerivation rec {
+  pname    = "hash-slinger";
+  name    = "${pname}-${version}";
+  version = "2.7";
+
+  src = fetchFromGitHub {
+    owner = "letoams";
+    repo = "${pname}";
+    rev = "${version}";
+    sha256 = "05wn744ydclpnpyah6yfjqlfjlasrrhzj48lqmm5a91nyps5yqyn";
+  };
+
+  pythonPath = with pythonPackages; [ dns m2crypto ipaddr python-gnupg
+                                      pyunbound ];
+
+  buildInputs = [ pythonPackages.wrapPython ];
+  propagatedBuildInputs = [ unbound libreswan ] ++ pythonPath;
+  propagatedUserEnvPkgs = [ unbound libreswan ];
+
+  patchPhase = ''
+    substituteInPlace Makefile \
+      --replace "$(DESTDIR)/usr" "$out"
+    substituteInPlace ipseckey \
+      --replace "/usr/sbin/ipsec" "${libreswan}/sbin/ipsec"
+    substituteInPlace tlsa \
+      --replace "/var/lib/unbound/root" "${pythonPackages.pyunbound}/etc/pyunbound/root"
+    patchShebangs *
+    '';
+
+  installPhase = ''
+    mkdir -p $out/bin $out/man $out/${python.sitePackages}/
+    make install
+    wrapPythonPrograms
+   '';
+
+   meta = {
+    description = "Various tools to generate special DNS records";
+    homepage    = "https://github.com/letoams/hash-slinger";
+    license     = stdenv.lib.licenses.gpl2Plus;
+    maintainers = [ stdenv.lib.maintainers.leenaars ];
+  };
+}