mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
42 lines
949 B
Nix
42 lines
949 B
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "pwnat";
|
|
# Latest release has an annoying segmentation fault bug, see:
|
|
# https://github.com/samyk/pwnat/pull/25 . Merging only #25 is impossible due
|
|
# to major code refactoring.
|
|
version = "2023-03-31";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "samyk";
|
|
repo = pname;
|
|
rev = "8ec62cdae53a2d573c9f9c906133ca45bbd3360a";
|
|
sha256 = "sha256-QodNw3ab8/TurKamg6AgMfQ08aalp4j6q663B+sWmRM=";
|
|
};
|
|
|
|
# See https://github.com/samyk/pwnat/issues/28
|
|
preBuild = ''
|
|
mkdir obj
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -D pwnat $out/bin/pwnat
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "http://samy.pl/pwnat/";
|
|
description = "ICMP NAT to NAT client-server communication";
|
|
license = lib.licenses.gpl3Plus;
|
|
maintainers = [ ];
|
|
platforms = with platforms; linux;
|
|
mainProgram = "pwnat";
|
|
};
|
|
}
|