-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
[staging] treewide: cmake buildInputs to nativeBuildInputs, minor cleanups #108022
Conversation
dc8364f
to
3139ea1
Compare
b7081cf
to
1ddb6fb
Compare
Can you also add a |
1ddb6fb
to
1da3b21
Compare
Does anyone know of situations where you do want Pending packages that trip up the regex: ag -l "buildInputs.*cmake" -f pkgs
|
There exists maybe one but I am not aware of any right now and if a package really needs cmake in buildInputs we should comment that. Also in the past similar things where made with pkg-config and autoReconfHook. Having cmake and other buildTools in nativeBuildInputs is really important for cross compiling and matters there the most. But changing all the other cmake into nativeBuildInputs could be a part two PR to get this PR merged in the next days. |
cbbabd7
to
99de0d3
Compare
@Ericson2314 do you still have that |
Bumped trackballs from 1.3.1 to 1.3.2, game builds and runs. |
I can target staging instead if the rebuilds are too much. |
master is fine for now |
I've noticed that in several cases cmake being in buildInputs can be indicative of a misunderstanding of the two buildInputs, since other packages like automake, gnumake, texinfo end up in the buildInputs as well. |
When making these changes its good for your sanity to also set |
I do not have enough computing resources to do a proper |
a7eec40
to
5fd50b1
Compare
this is also getting to the point that we should move this to staging:
|
Ok, I will rebase on staging. Which of the staging branches should I rebase on? |
792c743
to
ea8cbb9
Compare
I think this is enough changes for now, so we can see what regressions were introduced and remediate them. Thanks all for the feedback so far. |
|
/rebase-staging |
343bb73
to
47ad347
Compare
Hah, didn't know it was going to be done automatically, I just did it and force-pushed. |
digs through fish history begin
git ls-files | xargs sed -i -E \
-e 's%( *buildInputs.*=.*\[.*)autoreconfHook%\1FOO_FOO_FOO%g' \
-e 's%( *buildInputs.*=.*\[.*)pkgconfig%\1BAR_BAR_BAR%g'
git ls-files | xargs sed -i -E \
-e '/FOO_FOO_FOO.*BAR_BAR_BAR/i \ nativeBuildInputs = [ autoreconfHook pkgconfig ];' \
-e '/BAR_BAR_BAR.*FOO_FOO_FOO/i \ nativeBuildInputs = [ autoreconfHook pkgconfig ];'
git ls-files | xargs sed -i -E -e 's% *FOO_FOO_FOO(.*) +BAR_BAR_BAR%\1%g' -e 's% *BAR_BAR_BAR(.*) +FOO_FOO_FOO%\1%g'
git ls-files | xargs sed -i -E \
-e '/FOO_FOO_FOO/i \ nativeBuildInputs = [ autoreconfHook ];' \
-e '/BAR_BAR_BAR/i \ nativeBuildInputs = [ pkgconfig ];'
git ls-files | xargs sed -i -E -e 's% *FOO_FOO_FOO%%g' -e 's% *BAR_BAR_BAR%%g'
end But this is an abomination and someone should use hnix to write something better :). |
Thanks for doing this grunt work, @siraben! |
It was recently implemented, and I forgot about it when I made my first comment |
47ad347
to
6070629
Compare
6070629
to
fcbc6c8
Compare
@FRidh does staging have different merge requirements? Will the regressions be fixed later? |
@siraben I wanted to get this in to avoid merge conflicts. Regressions still need to be fixed though, preferably as soon as possible, but I would expect them to be few compared to the amount of changes made here already. Maybe I am wrong and I should not have merged this yet! |
Motivation for this change
It is very likely that
cmake
should be innativeBuildInputs
rather thanbuildInputs
, which would matter when cross-compiling,cmake
should be built on the build platform but not the host.Additionally I am performing minor changes to the expressions that should not change the outcome, for instance
pkgconfig
->pkg-config
fetchFromGit
->fetchFromGitHub
gpl(2|3)
->gpl(2|3)(Only|Plus)
enableParallelBuilding = true
(already defaults to true when using cmake)Edit: after seeing the affected packages approach 1000+ I have made much more conservative changes, future PRs should be done to check if packages like
flex
,bison
,doxygen
etc. are placed in the correct inputs list.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)