diff --git a/pkgs/tools/security/hash-slinger/default.nix b/pkgs/tools/security/hash-slinger/default.nix new file mode 100644 index 00000000000..9551c8e36db --- /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 ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5683c1add21..3dd3fc76312 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1947,6 +1947,8 @@ in hashcat = callPackage ../tools/security/hashcat { }; + hash-slinger = callPackage ../tools/security/hash-slinger { }; + hal-flash = callPackage ../os-specific/linux/hal-flash { }; halibut = callPackage ../tools/typesetting/halibut { };