Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 49 lines 1.2 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 installShellFiles, 6}: 7 8let 9 pname = "pack"; 10 version = "0.37.0"; 11in 12buildGoModule { 13 inherit pname version; 14 15 src = fetchFromGitHub { 16 owner = "buildpacks"; 17 repo = "pack"; 18 rev = "refs/tags/v${version}"; 19 hash = "sha256-QCN0UvWa5u9XX5LvY3yD8Xz2s1XzZUg/WXnAfWwZnY0="; 20 }; 21 22 vendorHash = "sha256-W8FTk2eJYaTE9gCRwrT+mDhda/ZZeCytqQ9vvVZZHSQ="; 23 24 nativeBuildInputs = [ installShellFiles ]; 25 26 subPackages = [ "cmd/pack" ]; 27 28 ldflags = [ 29 "-s" 30 "-w" 31 "-X github.com/buildpacks/pack.Version=${version}" 32 ]; 33 34 postInstall = '' 35 installShellCompletion --cmd pack \ 36 --zsh $(PACK_HOME=$PWD $out/bin/pack completion --shell zsh) \ 37 --bash $(PACK_HOME=$PWD $out/bin/pack completion --shell bash) \ 38 --fish $(PACK_HOME=$PWD $out/bin/pack completion --shell fish) 39 ''; 40 41 meta = { 42 homepage = "https://buildpacks.io/"; 43 changelog = "https://github.com/buildpacks/pack/releases/tag/v${version}"; 44 description = "CLI for building apps using Cloud Native Buildpacks"; 45 mainProgram = "pack"; 46 license = lib.licenses.asl20; 47 maintainers = with lib.maintainers; [ momeemt ]; 48 }; 49}