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.
40 lines
959 B
Nix
40 lines
959 B
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "norouter";
|
|
version = "0.6.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "norouter";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-EY/Yfyaz2DeQKHJ4awpQDbrVkse9crIZlLzfviPy3Tk=";
|
|
};
|
|
|
|
vendorHash = "sha256-RxrmYfEm1Maq8byoLXUr5RfXcwgqpCcAq5enMnl9V9E=";
|
|
|
|
subPackages = [ "cmd/norouter" ];
|
|
doInstallCheck = true;
|
|
installCheckPhase = ''
|
|
runHook preInstallCheck
|
|
|
|
$out/bin/norouter --version | grep ${version} > /dev/null
|
|
|
|
runHook postInstallCheck
|
|
'';
|
|
|
|
meta = with lib; {
|
|
# Doesn't build with Go >=1.21
|
|
# https://github.com/norouter/norouter/issues/165
|
|
broken = true;
|
|
description = "Tool to handle unprivileged networking by using multiple loopback addresses";
|
|
homepage = "https://github.com/norouter/norouter";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ blaggacao ];
|
|
mainProgram = "norouter";
|
|
};
|
|
}
|