From 8fb468e9fef969bca186ae8b5e0f35c4feffbad4 Mon Sep 17 00:00:00 2001 From: aleksana Date: Wed, 30 Oct 2024 00:10:24 +0800 Subject: [PATCH] cpu-go: init at 0-unstable-2024-10-17 --- pkgs/by-name/cp/cpu-go/package.nix | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 pkgs/by-name/cp/cpu-go/package.nix diff --git a/pkgs/by-name/cp/cpu-go/package.nix b/pkgs/by-name/cp/cpu-go/package.nix new file mode 100644 index 0000000000000..04ab3827bcec4 --- /dev/null +++ b/pkgs/by-name/cp/cpu-go/package.nix @@ -0,0 +1,34 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, + stdenv, + mdnsSupport ? stdenv.hostPlatform.isLinux, +}: + +buildGoModule { + pname = "cpu-go"; + version = "0-unstable-2024-10-17"; + + src = fetchFromGitHub { + owner = "u-root"; + repo = "cpu"; + rev = "54ca8c104060501ddc02ab5e3fc787d58feba1d8"; + hash = "sha256-+SQLxq7XKj2F81LrDpzs8c0VzTHdYg/fnVGlB75op3g="; + }; + + vendorHash = "sha256-0NBuVyyJG71jeghIohTuy9zi/qhDLqJa+jrPjR0C5co="; + + # Requires binding network port + checkFlags = [ "-skip=^TestDnsSdStart$" ]; + + tags = lib.optionals mdnsSupport [ "mDNS" ]; + + meta = { + description = "Implementation the Plan 9 cpu command in Go"; + homepage = "https://github.com/u-root/cpu"; + license = lib.licenses.bsd3; + mainProgram = "cpu"; + maintainers = with lib.maintainers; [ aleksana ]; + }; +}