Skip to content

Commit 908e008

Browse files
authored
buildpack: moved to by-name and modernized derivation (#345645)
2 parents 94e7097 + b5b06a2 commit 908e008

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed
Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
1-
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
2-
3-
buildGoModule rec {
1+
{
2+
lib,
3+
buildGoModule,
4+
fetchFromGitHub,
5+
installShellFiles,
6+
}:
7+
8+
let
49
pname = "pack";
510
version = "0.35.1";
11+
in
12+
buildGoModule {
13+
inherit pname version;
614

715
src = fetchFromGitHub {
816
owner = "buildpacks";
917
repo = pname;
10-
rev = "v${version}";
18+
rev = "refs/tags/v${version}";
1119
hash = "sha256-iQkYtnobhAt73JMRrejk0DkOH1ZW2bqfZx05ZrDG5bA=";
1220
};
1321

@@ -17,7 +25,11 @@ buildGoModule rec {
1725

1826
subPackages = [ "cmd/pack" ];
1927

20-
ldflags = [ "-s" "-w" "-X github.com/buildpacks/pack.Version=${version}" ];
28+
ldflags = [
29+
"-s"
30+
"-w"
31+
"-X github.com/buildpacks/pack.Version=${version}"
32+
];
2133

2234
postInstall = ''
2335
installShellCompletion --cmd pack \
@@ -26,12 +38,12 @@ buildGoModule rec {
2638
--fish $(PACK_HOME=$PWD $out/bin/pack completion --shell fish)
2739
'';
2840

29-
meta = with lib; {
41+
meta = {
3042
homepage = "https://buildpacks.io/";
3143
changelog = "https://github.com/buildpacks/pack/releases/tag/v${version}";
3244
description = "CLI for building apps using Cloud Native Buildpacks";
3345
mainProgram = "pack";
34-
license = licenses.asl20;
35-
maintainers = [ ];
46+
license = lib.licenses.asl20;
47+
maintainers = with lib.maintainers; [ momeemt ];
3648
};
3749
}

pkgs/top-level/all-packages.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4169,8 +4169,6 @@ with pkgs;
41694169

41704170
btrbk = callPackage ../tools/backup/btrbk { };
41714171

4172-
buildpack = callPackage ../development/tools/buildpack { };
4173-
41744172
bonk = callPackage ../tools/misc/bonk { };
41754173

41764174
bottom-rs = callPackage ../tools/misc/bottom-rs { };

0 commit comments

Comments
 (0)