mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 03:43:06 +00:00
755b915a15
nix run nixpkgs#silver-searcher -- -G '\.nix$' -0l 'description.*"[Aa]n?' pkgs \ | xargs -0 nix run nixpkgs#gnused -- -i '' -Ee 's/(description.*")[Aa]n? (.)/\1\U\2/'
67 lines
1.2 KiB
Nix
67 lines
1.2 KiB
Nix
{ 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 = "464XLAT CLAT implementation for Linux";
|
|
homepage = "https://github.com/toreanderson/clatd";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ jmbaur ];
|
|
mainProgram = "clatd";
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|