-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
stdenv/generic/setup.sh: extract Make logic #298838
base: staging
Are you sure you want to change the base?
Conversation
e65ed59
to
d03a0dd
Compare
d03a0dd
to
89b3174
Compare
4b3e961
to
a3194f2
Compare
@ofborg build apptainer singularity |
Test cases produced with @ofborg build tests.testers.runNixOSTest-example |
a3194f2
to
e94014f
Compare
Rebased it and resolved the merge conflict. |
Extract Make-related logics into separate functions. - Bash functions to call configure-script-related logics - scriptConfigure - Bash functions to call the make-related logics - makeBuild - makeCheck - makeInstall - makeInstallCheck - makeDist - Benefits: - Increase reusability. If applied, developers can call them from their pre* or post* phases when using language- or framework-specific build helpers that overwrites those Make-based phases.
Renamed |
e94014f
to
cfa7ed2
Compare
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/mix-workflows-by-extracting-build-commands-from-each-stages/48376/1 |
Description of changes
Extract
Make-based
build process into separated Bash functions to make them reusable by packages, making them reusable by packages using a language- or framework-specific build helpers that rewrite the phases.Proposed Bash functions containing the make-related logic:
Name each Make-based phasesWithhold due to the scale of fixes regarding the wide-spread "phases are Bash function" assumption. See #299045.make*Phase
and specify*Phase=make*Phase
by default. This makes it align with build process based on other build tools such as CMake.Use
apptainer
as an example how packages usingbuildGoModule
could benefit from the Make-based build commands provided bystdenv.mkDerivation
.Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.