Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

buildGoModule: find build/test targets with go list #284568

Draft
wants to merge 9 commits into
base: staging
Choose a base branch
from
Prev Previous commit
Next Next commit
treewide: add missing checkInputs and setup test environment for Go p…
…ackages
  • Loading branch information
katexochen committed Feb 11, 2024
commit 866b72be6c095fa6a041d635776745c3904712bc
4 changes: 4 additions & 0 deletions pkgs/by-name/cr/crossplane-cli/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ buildGoModule rec {

subPackages = [ "cmd/crank" ];

preCheck = ''
export HOME=$TMPDIR
'';

postInstall = ''
mv $out/bin/crank $out/bin/crossplane
'';
Expand Down
11 changes: 10 additions & 1 deletion pkgs/development/tools/database/atlas/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
{ lib, buildGoModule, fetchFromGitHub, installShellFiles, testers, atlas }:
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, testers
, git
, atlas
}:

buildGoModule rec {
pname = "atlas";
Expand All @@ -22,6 +29,8 @@ buildGoModule rec {

subPackages = [ "." ];

nativeCheckInputs = [ git ];

postInstall = ''
installShellCompletion --cmd atlas \
--bash <($out/bin/atlas completion bash) \
Expand Down
4 changes: 4 additions & 0 deletions pkgs/tools/admin/clair/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ buildGoModule rec {
"-X main.Version=${version}"
];

preCheck = ''
export HOME=$TMPDIR
'';

postInstall = ''
wrapProgram $out/bin/clair \
--prefix PATH : "${lib.makeBinPath [ rpm xz ]}"
Expand Down