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: override checkPhase in Go packages that also override build…
…Phase
  • Loading branch information
katexochen committed Feb 11, 2024
commit 910ea349d003094f0b06cafe0f08827ec8566a5f
6 changes: 6 additions & 0 deletions pkgs/desktops/deepin/go-package/deepin-pw-check/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ buildGoModule rec {
runHook postBuild
'';

checkPhase = ''
runHook preCheck
make test
runHook postCheck
'';

installPhase = ''
runHook preInstall
make install PREFIX="$out" PKG_FILE_DIR=$out/lib/pkgconfig PAM_MODULE_DIR=$out/etc/pam.d
Expand Down
4 changes: 4 additions & 0 deletions pkgs/development/libraries/boringssl/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ buildGoModule {
# CMAKE_OSX_ARCHITECTURES is set to x86_64 by Nix, but it confuses boringssl on aarch64-linux.
cmakeFlags = [ "-GNinja" ] ++ lib.optionals (stdenv.isLinux) [ "-DCMAKE_OSX_ARCHITECTURES=" ];

checkPhase = ''
ninjaCheckPhase
'';

installPhase = ''
mkdir -p $bin/bin $dev $out/lib

Expand Down