diff --git a/pkgs/by-name/co/colima/package.nix b/pkgs/by-name/co/colima/package.nix index 5ab0b0f2fee5..4472f497c25d 100644 --- a/pkgs/by-name/co/colima/package.nix +++ b/pkgs/by-name/co/colima/package.nix @@ -7,6 +7,7 @@ installShellFiles, lima, makeWrapper, + procps, qemu, testers, colima, @@ -43,6 +44,14 @@ buildGoModule rec { env.CGO_ENABLED = 1; + postPatch = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' + substituteInPlace cmd/daemon/daemon.go \ + --replace-fail '/usr/bin/pkill' '${lib.getExe' procps "pkill"}' + + substituteInPlace daemon/process/vmnet/vmnet.go \ + --replace-fail '/usr/bin/pkill' '${lib.getExe' procps "pkill"}' + ''; + preConfigure = '' ldflags="-s -w -X github.com/abiosoft/colima/config.appVersion=${version} \ -X github.com/abiosoft/colima/config.revision=$(cat .git-revision)" diff --git a/pkgs/by-name/li/lima/package.nix b/pkgs/by-name/li/lima/package.nix index 377a20665201..f4231043c34f 100644 --- a/pkgs/by-name/li/lima/package.nix +++ b/pkgs/by-name/li/lima/package.nix @@ -4,6 +4,7 @@ buildGoModule, callPackage, installShellFiles, + procps, qemu, darwin, makeWrapper, @@ -40,6 +41,11 @@ buildGoModule (finalAttrs: { substituteInPlace Makefile \ --replace-fail 'codesign -f -v --entitlements vz.entitlements -s -' 'codesign -f --entitlements vz.entitlements -s -' \ --replace-fail 'rm -rf _output vendor' 'rm -rf _output' + '' + # fixed upstream, remove when version >=2.0.0 + + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' + substituteInPlace pkg/networks/usernet/recoincile.go \ + --replace-fail '/usr/bin/pkill' '${lib.getExe' procps "pkill"}' ''; # It attaches entitlements with codesign and strip removes those,