Unverified Commit 3ecf126c authored by Paul Meyer's avatar Paul Meyer Committed by GitHub
Browse files

use finalAttrs on Go packages I maintain (#397910)

parents 530c64ab 978d35f3
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -6,14 +6,14 @@
  athens,
}:

buildGoModule rec {
buildGoModule (finalAttrs: {
  pname = "athens";
  version = "0.15.4";

  src = fetchFromGitHub {
    owner = "gomods";
    repo = "athens";
    rev = "v${version}";
    tag = "v${finalAttrs.version}";
    hash = "sha256-6NBdif8rQ1aj4nTYXhrWyErzRv0q8WpIheRnb2FCnkU=";
  };

@@ -22,7 +22,7 @@ buildGoModule rec {
  env.CGO_ENABLED = "0";
  ldflags = [
    "-s"
    "-X github.com/gomods/athens/pkg/build.version=${version}"
    "-X github.com/gomods/athens/pkg/build.version=${finalAttrs.version}"
  ];

  subPackages = [ "cmd/proxy" ];
@@ -47,4 +47,4 @@ buildGoModule rec {
    ];
    platforms = platforms.unix;
  };
}
})
+5 −5
Original line number Diff line number Diff line
@@ -5,14 +5,14 @@
  nix-update-script,
}:

buildGoModule rec {
buildGoModule (finalAttrs: {
  pname = "bluetuith";
  version = "0.2.3";

  src = fetchFromGitHub {
    owner = "darkhz";
    repo = pname;
    rev = "v${version}";
    repo = "bluetuith";
    tag = "v${finalAttrs.version}";
    hash = "sha256-yXH/koNT4ec/SOZhSU01iPNAfD1MdMjM2+wNmjXWsrk=";
  };

@@ -23,7 +23,7 @@ buildGoModule rec {
  ldflags = [
    "-s"
    "-w"
    "-X github.com/darkhz/bluetuith/cmd.Version=${version}@nixpkgs"
    "-X github.com/darkhz/bluetuith/cmd.Version=${finalAttrs.version}@nixpkgs"
  ];

  passthru.updateScript = nix-update-script { };
@@ -47,4 +47,4 @@ buildGoModule rec {
      katexochen
    ];
  };
}
})
+3 −3
Original line number Diff line number Diff line
@@ -5,14 +5,14 @@
  nix-update-script,
}:

buildGoModule rec {
buildGoModule (finalAttrs: {
  pname = "capslock";
  version = "0.2.7";

  src = fetchFromGitHub {
    owner = "google";
    repo = "capslock";
    rev = "v${version}";
    rev = "v${finalAttrs.version}";
    hash = "sha256-kRuEcrx9LBzCpXFWlc9bSsgZt84T8R8VFdbAWAseSPQ=";
  };

@@ -33,4 +33,4 @@ buildGoModule rec {
    mainProgram = "capslock";
    maintainers = with lib.maintainers; [ katexochen ];
  };
}
})
+4 −4
Original line number Diff line number Diff line
@@ -7,14 +7,14 @@
  distribution,
}:

buildGoModule rec {
buildGoModule (finalAttrs: {
  pname = "distribution";
  version = "3.0.0";

  src = fetchFromGitHub {
    owner = "distribution";
    repo = "distribution";
    tag = "v${version}";
    tag = "v${finalAttrs.version}";
    hash = "sha256-myezQTEdH7kkpCoAeZMf5OBxT4Bz8Qx6vCnwim230RY=";
  };

@@ -30,7 +30,7 @@ buildGoModule rec {
  passthru = {
    tests.version = testers.testVersion {
      package = distribution;
      version = "v${version}";
      version = "v${finalAttrs.version}";
    };
    updateScript = nix-update-script { };
  };
@@ -50,4 +50,4 @@ buildGoModule rec {
    mainProgram = "registry";
    platforms = platforms.unix;
  };
}
})
+5 −5
Original line number Diff line number Diff line
@@ -7,14 +7,14 @@
  go-critic,
}:

buildGoModule rec {
buildGoModule (finalAttrs: {
  pname = "go-critic";
  version = "0.13.0";

  src = fetchFromGitHub {
    owner = "go-critic";
    repo = "go-critic";
    rev = "v${version}";
    rev = "v${finalAttrs.version}";
    hash = "sha256-0AOhq7OhSHub4I6XXL018hg6i2ERkIbZCrO9osNjvHw=";
  };

@@ -27,7 +27,7 @@ buildGoModule rec {
  allowGoReference = true;

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

  passthru = {
@@ -41,9 +41,9 @@ buildGoModule rec {
  meta = {
    description = "Most opinionated Go source code linter for code audit";
    homepage = "https://go-critic.com/";
    changelog = "https://github.com/go-critic/go-critic/releases/tag/${src.rev}";
    changelog = "https://github.com/go-critic/go-critic/releases/tag/${finalAttrs.src.rev}";
    license = lib.licenses.mit;
    mainProgram = "gocritic";
    maintainers = with lib.maintainers; [ katexochen ];
  };
}
})
Loading