Unverified Commit e41b506a authored by Wolfgang Walther's avatar Wolfgang Walther Committed by GitHub
Browse files

scmpuff: 0.5.0 -> 0.6.0, some quality-of-life changes (#433801)

parents c2b5e16d e5c971ca
Loading
Loading
Loading
Loading
+24 −15
Original line number Diff line number Diff line
@@ -2,39 +2,48 @@
  lib,
  buildGoModule,
  fetchFromGitHub,
  testers,
  scmpuff,
  versionCheckHook,
}:

buildGoModule rec {
buildGoModule (finalAttrs: {
  pname = "scmpuff";
  version = "0.5.0";
  version = "0.6.0";

  src = fetchFromGitHub {
    owner = "mroth";
    repo = "scmpuff";
    rev = "v${version}";
    sha256 = "sha256-+L0W+M8sZdUSCWj9Ftft1gkRRfWMHdxon2xNnotx8Xs=";
    rev = "v${finalAttrs.version}";
    sha256 = "sha256-c8F7BgjbR/w2JH8lE2t93s8gj6cWbTQGIkgYTQp9R3U=";
  };

  vendorHash = "sha256-7WHVSEz3y1nxWfbxkzkfHhINLC8+snmWknHyUUpNy7c=";
  vendorHash = "sha256-7xSMToc5rlxogS0N9H6siauu8i33zUA5/omqXAszDOg=";

  ldflags = [
    "-s"
    "-w"
    "-X main.VERSION=${version}"
    # see .goreleaser.yml in the repository
    "-X main.version=${finalAttrs.version}"
    "-X main.commit=${finalAttrs.src.rev}"
    "-X main.date=1970-01-01T00:00:00Z"
    "-X main.builtBy=nixpkgs"
    "-X main.treeState=clean"
  ];

  passthru.tests.version = testers.testVersion {
    package = scmpuff;
    command = "scmpuff version";
  };
  strictDeps = true;

  doInstallCheck = true;
  nativeInstallCheckInputs = [ versionCheckHook ];
  versionCheckProgramArg = "--version";

  meta = with lib; {
    description = "Add numbered shortcuts to common git commands";
    description = "Numeric file shortcuts for common git commands";
    homepage = "https://github.com/mroth/scmpuff";
    changelog = "https://github.com/mroth/scmpuff/releases/tag/v${finalAttrs.version}";
    license = licenses.mit;
    maintainers = with maintainers; [ cpcloud ];
    maintainers = with maintainers; [
      cpcloud
      christoph-heiss
    ];
    mainProgram = "scmpuff";
  };
}
})