colima: 0.4.2 -> 0.4.4 (#179522)
* colima: use updated Makefile in build and install phases * colima: use lima-unwrapped * colima: fix dynamic version * colima: 0.4.2 -> 0.4.3 * colima: delete .git folder in postfetch when `leaveDotGit = true` Otherwise it may lead to non-deterministic behaviour. Co-authored-by: j-k <dev@j-k.io> * colima: do not override default buildGoModule phases The colima Makefile does more or less the same as the `buildGoModule` implementation. Instead of overriding it and using the Makefile directly, we reproduce the behaviour desired behaviour by customising env variables, e.g. `ldflags` and `subPackages`. Co-authored-by: j-k <dev@j-k.io> * colima: use `buildGoModule = buildGo118Module;` Co-authored-by: j-k <dev@j-k.io> * colima: update meta.description Co-authored-by: j-k <dev@j-k.io> * colima: set `CGO_ENABLED = 1` to make VPN connections work See https://github.com/abiosoft/colima/issues/358 * colima: 0.4.3 -> 0.4.4 * colima: define all ldflags in preConfigure Co-authored-by: Atemu <Atemu@users.noreply.github.com> * colima: add version test * colima: add meta.mainProgram and meta.platforms * colima: remove unused runCommand input Co-authored-by: j-k <dev@j-k.io> * colima: cleanup meta Co-authored-by: Sandro <sandro.jaeckel@gmail.com> * colima: drop meta.platforms because we use the default value of `platforms.darwin ++ platforms.linux` Co-authored-by: Sandro <sandro.jaeckel@gmail.com> Co-authored-by: Atemu <Atemu@users.noreply.github.com> * Update pkgs/applications/virtualization/colima/default.nix Co-authored-by: j-k <dev@j-k.io> Co-authored-by: Atemu <Atemu@users.noreply.github.com> Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
parent
025f00750d
commit
ac8fadc7f3
2 changed files with 23 additions and 14 deletions
|
@ -1,43 +1,47 @@
|
|||
{ lib
|
||||
, buildGo118Module
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, lima
|
||||
, makeWrapper
|
||||
, qemu
|
||||
, testers
|
||||
, colima
|
||||
}:
|
||||
|
||||
buildGo118Module rec {
|
||||
buildGoModule rec {
|
||||
pname = "colima";
|
||||
version = "0.4.2";
|
||||
version = "0.4.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "abiosoft";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-66nKH5jxTzLB9bg2lH1E8Cc0GZ6C/N/+yPYhCVEKOBY=";
|
||||
|
||||
sha256 = "bSBaSS+rVkFqTSdyegdE/F0X5u7yvF/nHslAO3xgD6I=";
|
||||
# We need the git revision
|
||||
leaveDotGit = true;
|
||||
postFetch = ''
|
||||
git -C $out rev-parse HEAD > $out/.git-revision
|
||||
git -C $out rev-parse --short HEAD > $out/.git-revision
|
||||
rm -rf $out/.git
|
||||
'';
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ installShellFiles makeWrapper ];
|
||||
|
||||
vendorSha256 = "sha256-91Ex3RPWxOHyZcR3Bo+bRdDAFw2mEGiC/uNKjdX2kuw=";
|
||||
vendorSha256 = "sha256-jDzDwK7qA9lKP8CfkKzfooPDrHuHI4OpiLXmX9vOpOg=";
|
||||
|
||||
doCheck = false;
|
||||
CGO_ENABLED = 1;
|
||||
|
||||
preConfigure = ''
|
||||
ldflags="-X github.com/abiosoft/colima/config.appVersion=${version}
|
||||
-X github.com/abiosoft/colima/config.revision=$(cat .git-revision)"
|
||||
ldflags="-s -w -X github.com/abiosoft/colima/config.appVersion=${version} \
|
||||
-X github.com/abiosoft/colima/config.revision=$(cat .git-revision)"
|
||||
'';
|
||||
|
||||
subPackages = [ "cmd/colima" ];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/colima \
|
||||
--prefix PATH : ${lib.makeBinPath [ lima ]}
|
||||
--prefix PATH : ${lib.makeBinPath [ lima qemu ]}
|
||||
|
||||
installShellCompletion --cmd colima \
|
||||
--bash <($out/bin/colima completion bash) \
|
||||
|
@ -45,10 +49,15 @@ buildGo118Module rec {
|
|||
--zsh <($out/bin/colima completion zsh)
|
||||
'';
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = colima;
|
||||
command = "HOME=$(mktemp -d) colima version";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Container runtimes on MacOS with minimal setup";
|
||||
description = "Container runtimes with minimal setup";
|
||||
homepage = "https://github.com/abiosoft/colima";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ aaschmid ];
|
||||
maintainers = with maintainers; [ aaschmid tricktron ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -34527,7 +34527,7 @@ with pkgs;
|
|||
|
||||
idsk = callPackage ../tools/filesystems/idsk { stdenv = gcc10StdenvCompat; };
|
||||
|
||||
colima = callPackage ../applications/virtualization/colima { };
|
||||
colima = callPackage ../applications/virtualization/colima { buildGoModule = buildGo118Module; };
|
||||
|
||||
lima = callPackage ../applications/virtualization/lima { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue