nixpkgs/pkgs/tools/security/hash-slinger/default.nix

46 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitHub, python2Packages, unbound, libreswan }:
2016-07-20 16:09:44 +00:00
2016-08-01 08:19:55 +00:00
let
pythonPackages = python2Packages;
2016-08-01 08:19:55 +00:00
in stdenv.mkDerivation rec {
2016-07-20 16:09:44 +00:00
pname = "hash-slinger";
version = "2.7";
src = fetchFromGitHub {
owner = "letoams";
2019-09-08 23:38:31 +00:00
repo = pname;
rev = version;
2016-07-20 16:09:44 +00:00
sha256 = "05wn744ydclpnpyah6yfjqlfjlasrrhzj48lqmm5a91nyps5yqyn";
};
pythonPath = with pythonPackages; [ dnspython m2crypto ipaddr python-gnupg
2016-07-20 16:09:44 +00:00
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/${pythonPackages.python.sitePackages}/
2016-07-20 16:09:44 +00:00
make install
wrapPythonPrograms
'';
meta = {
description = "Various tools to generate special DNS records";
homepage = "https://github.com/letoams/hash-slinger";
2021-01-15 09:19:50 +00:00
license = lib.licenses.gpl2Plus;
maintainers = [ lib.maintainers.leenaars ];
2016-07-20 16:09:44 +00:00
};
}