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

treewide: Re-add reverted Nix 2 syntax features #37693

Merged
merged 5 commits into from Aug 30, 2018

Conversation

jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Mar 23, 2018

Motivation for this change

Placeholders are just too convenient. See, for example, recently merged #37613

@jtojnar jtojnar added this to the 18.09 milestone Mar 23, 2018
@joepie91
Copy link
Contributor

FYI: placeholder usage is totally breaking Nix 1.11 on NixOS 17.09 stable when using the unstable channel (which is not uncommon, either totally or for specific packages), specifically breaking on gvfs. That issue is currently blocking a rebuild on my systems.

IMO, Nix 2.0-only expressions should not be merged until 18.03 is released.

@davidak
Copy link
Member

davidak commented Mar 25, 2018

@joepie91 workaround for 17.09:

nix.package = pkgs.nixStable2;

@matthewbauer
Copy link
Member

I think we should wait on this until NixOS/nix#2016 is resolved

@samueldr
Copy link
Member

samueldr commented Aug 26, 2018

I was asked to re-consider this issue. I am fine with the minimal version being 1.11 for 18.09, but there have been multiple occasions questioning the value of still keeping 1.11 around as the minimal version.

I think the only fully thought-of argument for keeping 1.11 around for 18.09 is nix#2016. This may not be important enough to warrant keeping 1.11 compatibility for 18.09.

I have been told by @dezgeg that there already are some parts of nixpkgs that won't build with 1.11.

<Dezgeg> huh, I thought we don't, given that many things (like building ISO images or nixos tests) require nix 2.0

Ripping the band-aid right now at the edge of the branch-off would, though, make it so that 18.09 has almost no 2.x specific features in, but ensures going forward 19.03 can use everything freely. Merging this will also bring out the users affected by such change, making them known values (if any) instead of theoretical figures.

Assuming this doesn't get merged by branch-off, I nominate this PR as being within the first merged to master right after making the release-18.09 branch.

@vcunat, and @edolstra, could you both give your opinion and judgement? I won't personally merge this before the branch-off (unless told to by one of you), but agree and support the decision of any of you two to merge this.


EDIT

Oh, a new development, don't keep from wanting to merge because of this, but we'll need to coordinate with @grahamc to update the ofborg fleet before pressing merge; if only to keep ofborg from needlessly failing a couple PRs. You know how to cooperate with him if you want to do it, or otherwise I can, too, and then merge. (Graham assured me it's only a small change, and will be quick.)

@vcunat
Copy link
Member

vcunat commented Aug 30, 2018

The largest inconvenience I can see is that this disables one-step upgrade from NixOS <= 17.09 to >= 18.09, as the abortion in ./default.nix will block nixos-rebuild from evaluating nix in the first step.

Now, the build-time closure of nix itself probably won't use placeholders yet, so the abortion itself would be the only blocker (as only new nix gets built and then it's used for further evaluation), but I can't see how to easily enforce this, and support periods for <= 17.09 and >= 18.09 do not overlap anyway. Therefore I'd just add a comment to https://github.com/NixOS/nixpkgs/blob/master/default.nix#L9 that they should switch to 18.03 to get nix2 before updating further.

EDIT: well, maybe we should generically suggest to upgrade only one release at a time, seeing that some users are likely to attempt even larger leaps #45685

@vcunat
Copy link
Member

vcunat commented Aug 30, 2018

On the other hand, is this change expected to help on the stable branch? (i.e. expected to conflict future with cherry-picks?) I understand it's handy on master, but for that it's the same if we do it just after branching 18.09.

@michaelpj
Copy link
Contributor

We already have this in practice - there was an issue recently about someone being unable to upgrade to versions due to incompatibilities in the Nix version.

As for why it's useful on stable, the main reason I can see is that it makes cherry picking patches easier.

@jtojnar jtojnar changed the title Nix minimal version: 1.11 -> 2.0 treewide: Re-add reverted Nix 2 syntax features Aug 30, 2018
@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Attempted: gmic

Partial log (click to expand)


Error: GIMP configuration failed.

  - Error: missing dependency glib-networking
      *** Test for glib-networking failed. This is required.

See the file 'INSTALL' for more help.
builder for '/nix/store/yw5x5i488khagcr3f7ixidxndl493849-gimp-2.10.6.drv' failed with exit code 1
cannot build derivation '/nix/store/wp9dd94908i4r0ajvka7j9gvhlxc0g2r-gmic-2.2.2.drv': 1 dependencies couldn't be built
error: build of '/nix/store/wp9dd94908i4r0ajvka7j9gvhlxc0g2r-gmic-2.2.2.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: gmic

Partial log (click to expand)

strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
patching script interpreter paths in /nix/store/906n295d8vdqv376s8vy9a5s271n6mvq-gmic-2.2.2-man
checking for references to /build in /nix/store/906n295d8vdqv376s8vy9a5s271n6mvq-gmic-2.2.2-man...
shrinking RPATHs of ELF executables and libraries in /nix/store/j2ym07zfp6810lm8znbn1fnspcyzvnrq-gmic-2.2.2-gimpPlugin
shrinking /nix/store/j2ym07zfp6810lm8znbn1fnspcyzvnrq-gmic-2.2.2-gimpPlugin/lib/gimp/2.0/plug-ins/gmic_gimp_gtk
strip is /nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/j2ym07zfp6810lm8znbn1fnspcyzvnrq-gmic-2.2.2-gimpPlugin/lib
patching script interpreter paths in /nix/store/j2ym07zfp6810lm8znbn1fnspcyzvnrq-gmic-2.2.2-gimpPlugin
checking for references to /build in /nix/store/j2ym07zfp6810lm8znbn1fnspcyzvnrq-gmic-2.2.2-gimpPlugin...
/nix/store/ifa9hf56i3fllmk290a5nxhpmj0z9vd6-gmic-2.2.2

@GrahamcOfBorg
Copy link

Timed out, unknown build status on aarch64-linux (full log)

Attempted: gmic

Partial log (click to expand)

fi
make[2]: Leaving directory '/build/gimp-2.10.6/po-script-fu'
Making check in po-tips
make[2]: Entering directory '/build/gimp-2.10.6/po-tips'
INTLTOOL_EXTRACT=/nix/store/sl4dzhivg3ibmqhlcb8z30smi21hk3dw-intltool-0.51.0/bin/intltool-extract srcdir=. /nix/store/sl4dzhivg3ibmqhlcb8z30smi21hk3dw-intltool-0.51.0/bin/intltool-update --gettext-package gimp20-tips --pot
rm -f missing notexist
srcdir=. /nix/store/sl4dzhivg3ibmqhlcb8z30smi21hk3dw-intltool-0.51.0/bin/intltool-update -m
building of '/nix/store/plpggms7ddvglwf1k7qlcjrsfsq6nzqm-gimp-2.10.6.drv' timed out after 3600 seconds
cannot build derivation '/nix/store/qcnvy9pj4pc8pk324izi0vby7xkdwcim-gmic-2.2.2.drv': 1 dependencies couldn't be built
error: build of '/nix/store/qcnvy9pj4pc8pk324izi0vby7xkdwcim-gmic-2.2.2.drv' failed

@grahamc
Copy link
Member

grahamc commented Aug 30, 2018

image

@jtojnar jtojnar merged commit 4caab41 into NixOS:master Aug 30, 2018
@jtojnar jtojnar deleted the min-nix-two branch August 30, 2018 17:50
matthewbauer added a commit to matthewbauer/nixpkgs that referenced this pull request Sep 8, 2018
This reverts commit 4caab41, reversing
changes made to 11dab7b.
@vcunat vcunat mentioned this pull request Jan 13, 2019
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: GNOME GNOME desktop environment and its underlying platform 10.rebuild-darwin: 11-100 10.rebuild-linux: 101-500
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants