buildpack: modernized derivation and formatted via nixfmt-rfc-style

- Removed `rec`
- Removed `with lib;`
- Changed `v${version}` to `refs/tags/v${version}` in `rev`
- Formatted via nixfmt-rfc-style
- Added @momeemt to maintainers
This commit is contained in:
Mutsuha Asada
2024-10-01 14:18:16 +09:00
parent b523c0d26e
commit 8e6e68bb60

View File

@@ -1,13 +1,21 @@
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
let
pname = "pack";
version = "0.35.1";
in
buildGoModule {
inherit pname version;
src = fetchFromGitHub {
owner = "buildpacks";
repo = pname;
rev = "v${version}";
rev = "refs/tags/v${version}";
hash = "sha256-iQkYtnobhAt73JMRrejk0DkOH1ZW2bqfZx05ZrDG5bA=";
};
@@ -17,7 +25,11 @@ buildGoModule rec {
subPackages = [ "cmd/pack" ];
ldflags = [ "-s" "-w" "-X github.com/buildpacks/pack.Version=${version}" ];
ldflags = [
"-s"
"-w"
"-X github.com/buildpacks/pack.Version=${version}"
];
postInstall = ''
installShellCompletion --cmd pack \
@@ -26,12 +38,12 @@ buildGoModule rec {
--fish $(PACK_HOME=$PWD $out/bin/pack completion --shell fish)
'';
meta = with lib; {
meta = {
homepage = "https://buildpacks.io/";
changelog = "https://github.com/buildpacks/pack/releases/tag/v${version}";
description = "CLI for building apps using Cloud Native Buildpacks";
mainProgram = "pack";
license = licenses.asl20;
maintainers = [ ];
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ momeemt ];
};
}