diff options
author | Thibault Gagnaux <tgagnaux@gmail.com> | 2023-03-06 09:13:58 +0100 |
---|---|---|
committer | Thibault Gagnaux <tgagnaux@gmail.com> | 2023-03-06 09:13:58 +0100 |
commit | cd20e3b85e7fd8c5a3f303634022d7f794ac292b (patch) | |
tree | f29987ced30c673ac4cffc5256a918f421c64cb1 /pkgs/applications/virtualization/colima/default.nix | |
parent | 21eda9bc80bef824a037582b1e5a43ba74e92daa (diff) |
colima: patch `sw_vers` on darwin
Diffstat (limited to 'pkgs/applications/virtualization/colima/default.nix')
-rw-r--r-- | pkgs/applications/virtualization/colima/default.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/applications/virtualization/colima/default.nix b/pkgs/applications/virtualization/colima/default.nix index e49c2a659121..05038f564e3d 100644 --- a/pkgs/applications/virtualization/colima/default.nix +++ b/pkgs/applications/virtualization/colima/default.nix @@ -1,5 +1,6 @@ { lib , stdenv +, darwin , buildGoModule , fetchFromGitHub , installShellFiles @@ -44,6 +45,11 @@ buildGoModule rec { subPackages = [ "cmd/colima" ]; + postPatch = lib.optionalString stdenv.isDarwin '' + substituteInPlace util/util.go \ + --replace 'sw_vers' "${darwin.DarwinTools}/bin/sw_vers" + ''; + postInstall = '' wrapProgram $out/bin/colima \ --prefix PATH : ${lib.makeBinPath [ lima-drv qemu ]} |