nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 60 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitLab, 5 pkg-config, 6 libbsd, 7 installShellFiles, 8}: 9 10stdenv.mkDerivation rec { 11 pname = "netcat-openbsd"; 12 version = "1.219-1"; 13 14 src = fetchFromGitLab { 15 domain = "salsa.debian.org"; 16 owner = "debian"; 17 repo = "netcat-openbsd"; 18 rev = "refs/tags/debian/${version}"; 19 sha256 = "sha256-rN8pl3Qf0T8bXGtVH22tBpGY/EcnbgGm1G8Z2patGbo="; 20 }; 21 22 strictDeps = true; 23 nativeBuildInputs = [ 24 pkg-config 25 installShellFiles 26 ]; 27 buildInputs = [ libbsd ]; 28 29 postPatch = '' 30 for file in $(cat debian/patches/series); do 31 patch -p1 < debian/patches/$file 32 done 33 ''; 34 35 installPhase = '' 36 runHook preInstall 37 38 mkdir -p $out/bin 39 mv nc $out/bin/nc 40 installManPage nc.1 41 42 runHook postInstall 43 ''; 44 45 doInstallCheck = true; 46 installCheckPhase = '' 47 $out/bin/nc -h 2> /dev/null 48 ''; 49 50 meta = with lib; { 51 description = "TCP/IP swiss army knife. OpenBSD variant"; 52 homepage = "https://salsa.debian.org/debian/netcat-openbsd"; 53 maintainers = with maintainers; [ artturin ]; 54 license = licenses.bsd3; 55 platforms = platforms.unix; 56 mainProgram = "nc"; 57 # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs 58 broken = stdenv.hostPlatform.isDarwin; 59 }; 60}