diff options
Diffstat (limited to 'pkgs/by-name/cl/clatd/package.nix')
-rw-r--r-- | pkgs/by-name/cl/clatd/package.nix | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/pkgs/by-name/cl/clatd/package.nix b/pkgs/by-name/cl/clatd/package.nix new file mode 100644 index 0000000000000..f18ab3b036cea --- /dev/null +++ b/pkgs/by-name/cl/clatd/package.nix @@ -0,0 +1,66 @@ +{ lib +, stdenv +, fetchFromGitHub +, makeWrapper +, perl +, perlPackages +, tayga +, iproute2 +, iptables +, nixosTests +}: + +stdenv.mkDerivation rec { + pname = "clatd"; + version = "1.6"; + + src = fetchFromGitHub { + owner = "toreanderson"; + repo = "clatd"; + rev = "v${version}"; + hash = "sha256-ZUGWQTXXgATy539NQxkZSvQA7HIWkIPsw1NJrz0xKEg="; + }; + + strictDeps = true; + + nativeBuildInputs = [ + makeWrapper + perl # for pod2man + ]; + + buildInputs = with perlPackages; [ + perl + NetIP + NetDNS + ]; + + makeFlags = [ "PREFIX=$(out)" ]; + + preBuild = '' + mkdir -p $out/{sbin,share/man/man8} + ''; + + postFixup = '' + patchShebangs $out/bin/clatd + wrapProgram $out/bin/clatd \ + --set PERL5LIB $PERL5LIB \ + --prefix PATH : ${ + lib.makeBinPath [ + tayga + iproute2 + iptables + ] + } + ''; + + passthru.tests.clatd = nixosTests.clatd; + + meta = with lib; { + description = "A 464XLAT CLAT implementation for Linux"; + homepage = "https://github.com/toreanderson/clatd"; + license = licenses.mit; + maintainers = with maintainers; [ jmbaur ]; + mainProgram = "clatd"; + platforms = platforms.linux; + }; +} |