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

Update nixpkgs to ghc 8.10.4 #1538

Merged
merged 11 commits into from Mar 16, 2021
Merged

Update nixpkgs to ghc 8.10.4 #1538

merged 11 commits into from Mar 16, 2021

Conversation

berberman
Copy link
Collaborator

Follows #1531

nix/default.nix Show resolved Hide resolved
nix/sources.json Show resolved Hide resolved
nix/default.nix Outdated
super.${args.pname}.meta.broken
else
false;
in super.mkDerivation (args // { jailbreak = imBroken; });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That override is so beautiful. Maybe throw a { doCheck = !imBroken } in there, too?

Copy link
Contributor

@maralorn maralorn Mar 11, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then you could get rid of the manual hiedb override again. Oh, man that solution is sooo good, I’m hyped.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe throw a { doCheck = !imBroken } in there, too?

Hmm, I was going to do that, but it finally turned out:

error: --- EvalError -------------------------------------------------------------------------------------------------------------------------- nix-shell
at: (12:21) in file: /home/berberman/Desktop/haskell/haskell-language-server/nix/default.nix

    11|                   if hasAttr args.pname super then
    12|                     super.${args.pname}.meta.broken
      |                     ^
    13|                   else

infinite recursion encountered
(use '--show-trace' to show detailed location information)

I have no idea :(

That override is so beautiful.

Agree! It works as expected on linux: https://github.com/haskell/haskell-language-server/runs/2083888202, but on macOS, there are still too many things to rebuild: https://github.com/haskell/haskell-language-server/runs/2083888222. Perhaps I missed something?

And similar to f8c741a (https://github.com/haskell/haskell-language-server/runs/2067577443), the build on macOS run into:

Undefined symbols for architecture x86_64:
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [../../../common/unix.mk:61: Tracy-release] Error 1
make[1]: Leaving directory '/private/tmp/nix-build-tracy-0.7.6.drv-0/source/profiler/build/unix'
make: *** [Makefile:7: release] Error 2
make: Leaving directory '/private/tmp/nix-build-tracy-0.7.6.drv-0/source/profiler/build/unix'
builder for '/nix/store/gczrzdw35pw0idnpxl20qpsmmaxcbml0-tracy-0.7.6.drv' failed with exit code 2
error: build of '/nix/store/fi1rkc67njzpcivf69r9avp6da053wp6-ghc-8.10.4-with-packages.drv', '/nix/store/gczrzdw35pw0idnpxl20qpsmmaxcbml0-tracy-0.7.6.drv' failed

It's a non-haskell package https://github.com/NixOS/nixpkgs/blob/nixpkgs-unstable/pkgs/development/tools/tracy/default.nix we add in shell

Maybe this package from nixpkgs-unstable is broken on macOS?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about

-                imBroken = with builtins;
-                  if hasAttr args.pname super then
-                    super.${args.pname}.meta.broken
-                  else
-                    false;
-              in super.mkDerivation (args // { jailbreak = imBroken; });
-            hiedb = pkgs.haskell.lib.dontCheck super.hiedb;
+                broken = args.broken or false;
+              in super.mkDerivation (args // { jailbreak = broken; doCheck = !broken; });

that could fix the first problem. Not sure about the macOs thing, but probably we just need a nixpkgs commit where it’s not broken.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this solution is more concise and powerful. How to confirm that tracy is really broken? Is it possible to reproduce the build elsewhere?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@berberman
Copy link
Collaborator Author

That's awesome! We didn't rebuild any redundants without maintaining a list of jailbroken packages. And once these packages get fixed in nixpkgs, no build will be required at all.

Linux:

these derivations will be built:
  /nix/store/imqn6j16d121zk3pmyyibcax3i9k942h-remove-references-to.drv
  /nix/store/44f3dnnaahx5i6c8a27cji1llhi40i1f-active-0.2.0.14.drv
  /nix/store/bzd4sl3cqldm55wm2qvdy2bjwrcyzjp3-monoid-extras-0.5.1.drv
  /nix/store/gv8hq30vabiy0mrv7s4bnq1v2zk2wwr1-dual-tree-0.2.2.1.drv
  /nix/store/jdhixynq8l706jk9wvqhl6nnqyrwg9kg-diagrams-core-1.4.2.drv
  /nix/store/dbv9yqi07abhrh2pyp7as60h5iaxz88g-diagrams-lib-1.4.3.drv
  /nix/store/h5i5jcpj72c1p6fip6350w4878alpwc8-svg-builder-0.1.1.drv
  /nix/store/pvjzcrg2s4rssqmmh61vqz5ngnhc9hla-statestack-0.3.drv
  /nix/store/i331sm6pnpdpfrj6grxflhx35fj5r29a-diagrams-postscript-1.5.drv
  /nix/store/lvqigbimri785jj3f52q2pdb78q2z3km-SVGFonts-1.7.0.1.drv
  /nix/store/pwzzkfx3rr28ica8zgbmi91mnzjyk1ci-diagrams-svg-1.4.3.drv
  /nix/store/2y23bx572x5mvlz17ajqwwyfy0dm8sn1-Chart-diagrams-1.9.3.drv
  /nix/store/dcq58yki9b98asx2qis3w7ygx7aclrf3-force-layout-0.4.0.6.drv
  /nix/store/mrzvzm9w32xnd0xl2lcw1ivzclhs7sf7-hie-compat-0.1.0.0.drv
  /nix/store/kdxhp9i5fray8yriajkzzd8jf4jqj0sj-hiedb-0.3.0.1.drv
  /nix/store/n9i0n46598mq25ysfprr8lbrinh42hfc-diagrams-contrib-1.4.4.drv
  /nix/store/r7d7wq9mdqzxg6n0az5n9s7zc5v86p6j-diagrams-1.4.drv
  /nix/store/a90ra7av8fbpigz6ihdjnxpnlsgc1v05-ghc-8.10.4-with-packages.drv
  /nix/store/ysyj8dvs8lbr4ns3pjx3h9mrcqirhmxn-pre-commit-config.json.drv

MacOS:

these derivations will be built:
  /nix/store/9ilafr8whxz231xifls2xzj61lzg9b74-remove-references-to.drv
  /nix/store/5c35lvjk2s2k70hhvfg83dmcm02yjq53-statestack-0.3.drv
  /nix/store/s3lyh409841jfx1winciplaq70x9qfgk-monoid-extras-0.5.1.drv
  /nix/store/038a04yf6l93br4s7ck3mcn5wl7jpnkd-dual-tree-0.2.2.1.drv
  /nix/store/8d1kd2j3ik8bliga2qk0bz5s2444xwfg-active-0.2.0.14.drv
  /nix/store/z41pww693xjiilhnkgw8q5ymig553267-diagrams-core-1.4.2.drv
  /nix/store/vn8f13d338hyh8x0n9vccijmjs1j0aad-diagrams-lib-1.4.3.drv
  /nix/store/0360jbvfifq6s39dacmnvm7rps8izmj6-diagrams-postscript-1.5.drv
  /nix/store/9jkzlx6mid36n6fns2v4jczpzm070hk6-SVGFonts-1.7.0.1.drv
  /nix/store/z657qavh4c4ygmkz43kk9vwj2b9fyxmx-svg-builder-0.1.1.drv
  /nix/store/xjkl4x1wq60fw022506ia3ld73l6yc1g-diagrams-svg-1.4.3.drv
  /nix/store/1fdgi64rl9jfs166p4bq2m57jrz7mlm2-Chart-diagrams-1.9.3.drv
  /nix/store/2g12c4ilwpm5f48169ripi983ycg4ar4-hie-compat-0.1.0.0.drv
  /nix/store/5bn1rmwmwixfxk8pjr087cgmp0zvx41a-hiedb-0.3.0.1.drv
  /nix/store/niilxajjkgd0fn04qva50ixpag53r54c-force-layout-0.4.0.6.drv
  /nix/store/jr6g7ajb67v5jv1vxbh2032nx4mgmffv-diagrams-contrib-1.4.4.drv
  /nix/store/g61zjh3ds6b1520xzz3rpq4p7bfbj93s-diagrams-1.4.drv
  /nix/store/lbwd6ma3qw4mmlprcysjmv3l1mn31x8v-tracy-0.7.6.drv
  /nix/store/r3kybkj6f5qcy70vszwpp6m8s3ksss8z-pre-commit-config.json.drv
  /nix/store/wjbpml9bgcbxdansnl78i7cyb3jhv02h-ghc-8.10.4-with-packages.drv

nix/default.nix Outdated Show resolved Hide resolved
@pepeiborra
Copy link
Collaborator

Any changes needed to the maintainer notes at the top of shell.nix?

@berberman
Copy link
Collaborator Author

We no longer need modify shell.nix and default.nix simultaneously when adding new packages -- declaring them in ourSources in default.nix would be enough. But I think the current notes still make sense.

@berberman
Copy link
Collaborator Author

We made it! No dependencies required to be built:

these derivations will be built:
  /nix/store/a90ra7av8fbpigz6ihdjnxpnlsgc1v05-ghc-8.10.4-with-packages.drv

@maralorn
Copy link
Contributor

Any changes needed to the maintainer notes at the top of shell.nix?

As it stands no, I don’t think so.

That being said shell.nix seems to duplicate the list of packages in the default.nix, we could consider to deduplicate that, but it wouldn‘t have to be part of this commit.

@berberman
Copy link
Collaborator Author

@pepeiborra I override tracy to use its previous version. Let's merge this as soon as possible

@pepeiborra
Copy link
Collaborator

@pepeiborra I override tracy to use its previous version. Let's merge this as soon as possible

What was the problem with it?

@berberman
Copy link
Collaborator Author

The build of tracy-0.7.6 was failing on macOS: https://hydra.nixos.org/build/138394082/nixlog/1
I created a comment: NixOS/nixpkgs#112539. Not sure how long it will take to get it fixed by maintainers, so I think we could use the old version for now.

shell.nix Show resolved Hide resolved
@berberman berberman merged commit 86d67ff into master Mar 16, 2021
@berberman berberman deleted the update-nix branch March 16, 2021 10:36
@maralorn
Copy link
Contributor

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants