Unverified Commit 7bf44709 authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

pj: init at 1.11.0 (#488434)

parents c293161f 71ae0ad1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -12924,6 +12924,12 @@
    github = "jooooscha";
    githubId = 57965027;
  };
  josephschmitt = {
    name = "Joseph Schmitt";
    email = "dev@joe.sh";
    github = "josephschmitt";
    githubId = 136007;
  };
  josephst = {
    name = "Joseph Stahl";
    email = "hello@josephstahl.com";
+42 −0
Original line number Diff line number Diff line
{
  lib,
  buildGoModule,
  fetchFromGitHub,
  nix-update-script,
  versionCheckHook,
}:

buildGoModule (finalAttrs: {
  pname = "pj";
  version = "1.11.0";

  src = fetchFromGitHub {
    owner = "josephschmitt";
    repo = "pj";
    tag = "v${finalAttrs.version}";
    hash = "sha256-xorBRRiG4mcXf0QtsYnEkNnEjyTemfNrpkK/aEbkOjQ=";
  };

  vendorHash = "sha256-rya2afSV9Y1hmUZU0wyR9NETBl3TXD/OTHv0zvVl8v8=";

  ldflags = [
    "-s"
    "-X main.version=${finalAttrs.version}"
  ];

  nativeInstallCheckInputs = [
    versionCheckHook
  ];
  doInstallCheck = true;

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Fast project directory finder that searches filesystems for git repositories";
    homepage = "https://github.com/josephschmitt/pj";
    changelog = "https://github.com/josephschmitt/pj/blob/${finalAttrs.src.tag}/CHANGELOG.md";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ josephschmitt ];
    mainProgram = "pj";
  };
})