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 packages from 23.05 to 23.11 #125

Closed
wants to merge 5 commits into from

Conversation

jonathanlking
Copy link
Collaborator

@jonathanlking jonathanlking commented Jan 1, 2024

Updates nixpkgs to 23.11.

  • nix build --impure --expr '(import ./survey { useArchiveFilesForTemplateHaskell = true; }).working'
  • nix build --impure --expr '(import ./survey { }).working'

Completely succeed.

  • nix build --impure --expr '(import ./survey { compiler = "ghc963"; }).working' succeeds except for:
    • ShellCheck and stack (transitively) fail to build due to mtl < 2.3.
    • darcs fails due to unix <2.8.

nixpkgs.nix Outdated
# This is nixos-23.05 as of 2023-06-08, with minimal patches currently having open nixpkgs PR (see commits for PR links).
else import (fetchTarball https://github.com/nh2/nixpkgs/archive/9e49f8f1f37bc906cda1adb33064c325d760819a.tar.gz) {}
# This is nixos-23.11 as of 2024-01-01, with minimal patches currently having open nixpkgs PR (see commits for PR links).
else import (fetchTarball https://github.com/nh2/nixpkgs/archive/ca1f69776b9dda07656a1051310e5e138aa83067.tar.gz) {}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have started with your static-haskell-nix-nixos-23.05 branch, which included the following patches:

I then picked the current nixos-23.11 (NixOS/nixpkgs@32f6357) and cherry-picked nh2/nixpkgs@9e49f8f1f37b on top.

I have a static-haskell-nix-nixos-23.11 branch on my fork, which you could just copy over to yours if you're happy with these changes — I find it a bit odd that GitHub already allows accessing the archive under your fork but 🤷‍♂️

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have also included NixOS/nixpkgs#278099 so that p11-kit (which is a dependency of many things, including ghc) builds on single-user install non-NixOS systems.

@jonathanlking
Copy link
Collaborator Author

jonathanlking commented Jan 2, 2024

Unfortunately the GHC 9.6 releases with enableShared = false, which is set through useArchiveFilesForTemplateHaskell = true, are still broken.
I think this could be the same issue as NixOS/nixpkgs#208959 (comment)?

$ nix build --impure --expr '(import ./survey { compiler = "ghc963"; useArchiveFilesForTemplateHaskell = true; }).haskellPackages.ghc'
...
/---------------------------------------------------------\
| Successfully built program 'hp2ps' (Stage1).            |
| Executable: _build/stage1/bin/hp2ps                     |
| Program synopsis: Heap Profile to PostScript converter. |
\---------------------------------------------------------/
| Run Ghc CompileHs Stage1: libraries/ghc-bignum/src/GHC/Num/Backend/Native.hs => _build/stage1/libraries/ghc-bignum/build/GHC/Num/Backend/Native.p_o
| Copy package 'ghc-prim'
# cabal-copy (for _build/stage1/lib/package.conf.d/ghc-prim-0.10.0.conf)
inished in 8m29s^GError, rule finished running but did not produce file:
  _build/stage1/lib/x86_64-linux-ghc-9.6.3/libHSrts-1.0.2-ghc9.6.3.so
Build failed.

GHC 9.8.1 does seem to work though, i.e. nix build --impure --expr '(import ./survey { compiler = "ghc981"; useArchiveFilesForTemplateHaskell = true; }).haskellPackages.ghc'.

# Disable failing tests for postgresql on musl that should have no impact
# on the libpq that we need (collate.icu.utf8 and foreign regression tests)
# This approach is copied from PostgREST, see https://github.com/PostgREST/postgrest/pull/2002/files#diff-72929db01d3c689277a1e7777b5df1dbbb20c5de41d1502ff8ac6b443a4e74c6R45
postgresql = (previous.postgresql_14.overrideAttrs (old: { dontDisableStatic = true; doCheck = false; })).override {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I copied this comment wholesale from PostgREST too.
I have no reason to doubt it (and have been running software in production with no issues), but I'm not an expert on this.

@jonathanlking jonathanlking marked this pull request as ready for review January 2, 2024 18:42
@domenkozar
Copy link
Contributor

cc @nh2

@nh2
Copy link
Owner

nh2 commented Jun 9, 2024

Relating to #125 (comment)

This still fails on NixOS 24.05 with ghc965:

... -A haskellPackages.hello --arg useArchiveFilesForTemplateHaskell true

fails with:

ghc-musl> Finished in 7m31sError, rule finished running but did not produce file:
ghc-musl>   _build/stage1/lib/x86_64-linux-ghc-9.6.5/libHSrts-1.0.2-ghc9.6.5.so

nh2 added a commit that referenced this pull request Jun 9, 2024
@nh2
Copy link
Owner

nh2 commented Jun 9, 2024

This still fails on NixOS 24.05 with ghc965:

Fixed by @NorfairKing's patch in NixOS/nixpkgs#317175

We cherry-picked it onto the nixos-24.05 branch

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.

3 participants