1 Star 0 Fork 0

devdz/colima

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
colima.nix 1011 Bytes
一键复制 编辑 原始数据 按行查看 历史
Abiola Ibrahim 提交于 2023-11-12 11:28 . v0.6.0 refactor (#848)
{ pkgs ? import <nixpkgs> }:
with pkgs;
buildGo120Module {
name = "colima";
pname = "colima";
src = ./.;
nativeBuildInputs = [ installShellFiles makeWrapper git ];
vendorSha256 = "sha256-7DIhSjHpaCyHyXKhR8KWQc2YGaD8CMq+BZHF4zIkL50=";
CGO_ENABLED = 1;
subPackages = [ "cmd/colima" ];
# `nix-build` has .git folder but `nix build` does not, this caters for both cases
preConfigure = ''
export VERSION="$(git describe --tags --always || echo nix-build-at-"$(date +%s)")"
export REVISION="$(git rev-parse HEAD || echo nix-unknown)"
ldflags="-X github.com/abiosoft/colima/config.appVersion=$VERSION
-X github.com/abiosoft/colima/config.revision=$REVISION"
'';
postInstall = ''
wrapProgram $out/bin/colima \
--prefix PATH : ${lib.makeBinPath [ qemu lima ]}
installShellCompletion --cmd colima \
--bash <($out/bin/colima completion bash) \
--fish <($out/bin/colima completion fish) \
--zsh <($out/bin/colima completion zsh)
'';
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/devdz/colima.git
git@gitee.com:devdz/colima.git
devdz
colima
colima
main

搜索帮助