From 8af2151beddb7d94ba9bc142f2e9a161b7f94fd8 Mon Sep 17 00:00:00 2001 From: Paul Meyer <49727155+katexochen@users.noreply.github.com> Date: Sat, 30 Dec 2023 11:04:05 +0100 Subject: [PATCH] crc: cleanup - use subPackages instead of modRoot - remove unused dependencies - remove unused substitutions in Makefile - set HOME in preCheck, as it is required for tests --- .../networking/cluster/crc/default.nix | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/networking/cluster/crc/default.nix b/pkgs/applications/networking/cluster/crc/default.nix index fd5012447fe3..21225857eb15 100644 --- a/pkgs/applications/networking/cluster/crc/default.nix +++ b/pkgs/applications/networking/cluster/crc/default.nix @@ -1,11 +1,8 @@ { lib , buildGoModule , fetchFromGitHub -, git -, stdenv , testers , crc -, runtimeShell , coreutils }: @@ -21,7 +18,6 @@ in buildGoModule rec { version = "2.30.0"; pname = "crc"; - modRoot = "cmd/crc"; src = fetchFromGitHub { owner = "crc-org"; @@ -32,16 +28,15 @@ buildGoModule rec { vendorHash = null; - nativeBuildInputs = [ git ]; - postPatch = '' substituteInPlace pkg/crc/oc/oc_linux_test.go \ --replace "/bin/echo" "${coreutils}/bin/echo" - - substituteInPlace Makefile \ - --replace "/bin/bash" "${runtimeShell}" ''; + subPackages = [ + "cmd/crc" + ]; + tags = [ "containers_image_openpgp" ]; ldflags = [ @@ -54,7 +49,7 @@ buildGoModule rec { "-X github.com/crc-org/crc/v2/pkg/crc/segment.WriteKey=${writeKey}" ]; - preBuild = '' + preCheck = '' export HOME=$(mktemp -d) '';