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

nix: upgrade packages #2142

Closed
wants to merge 1 commit into from

Conversation

wolfgangwalther
Copy link
Member

No description provided.

@wolfgangwalther
Copy link
Member Author

The static build fails with:

error: anonymous function at /nix/store/8vsx0a840q10w0in1y8lagk2j42lik6x-patched-nixpkgs/pkgs/development/libraries/ncurses/default.nix:1:1 called with unexpected argument 'enableShared', at /nix/store/8vsx0a840q10w0in1y8lagk2j42lik6x-patched-nixpkgs/lib/customisation.nix:69:16
(use '--show-trace' to show detailed location information)

What to do now, @monacoremo?

@robx
Copy link
Contributor

robx commented Jun 7, 2022

The static build fails with:

error: anonymous function at /nix/store/8vsx0a840q10w0in1y8lagk2j42lik6x-patched-nixpkgs/pkgs/development/libraries/ncurses/default.nix:1:1 called with unexpected argument 'enableShared', at /nix/store/8vsx0a840q10w0in1y8lagk2j42lik6x-patched-nixpkgs/lib/customisation.nix:69:16
(use '--show-trace' to show detailed location information)

What to do now, @monacoremo?

I'm seeing the same error over on #2292. The immediate error can be fixed by patching static-haskell-nix with

diff --git a/survey/default.nix b/survey/default.nix
index 46d8066..a47f214 100644
--- a/survey/default.nix
+++ b/survey/default.nix
@@ -1519,7 +1519,7 @@ let
                   [
                     "--enable-executable-static" # requires `useFixedCabal`
                     # `enableShared` seems to be required to avoid `recompile with -fPIC` errors on some packages.
-                    "--extra-lib-dirs=${final.ncurses.override { enableStatic = true; enableShared = true; }}/lib"
+                    "--extra-lib-dirs=${final.ncurses}/lib"
                   ]
                   # TODO Figure out why this and the below libffi are necessary.
                   #      `working` and `workingStackageExecutables` don't seem to need that,

but then the next failure is

error: anonymous function at /nix/store/b0bknxjr30psjc8n3xd1hp3zn4i4p9rp-source/pkgs/development/haskell-modules/generic-builder.nix:13:1 called with unexpected argument 'mkDerivation'

       at /nix/store/b0bknxjr30psjc8n3xd1hp3zn4i4p9rp-source/lib/customisation.nix:69:16:

           68|     let
           69|       result = f origArgs;
             |                ^
           70|

which I haven't been able to fix yet.

I think the issue is that static-haskell-nix needs to be updated to be compatible with the updated nixpkgs version. A way to dig into this is:

diff --git a/nixpkgs.nix b/nixpkgs.nix
index 18eb9c9..f106232 100644
--- a/nixpkgs.nix
+++ b/nixpkgs.nix
@@ -25,4 +25,4 @@ if builtins.getEnv "STATIC_HASKELL_NIX_CI_NIXPKGS_UNSTABLE_BUILD" == "1"
     if builtins.pathExists ./nixpkgs/pkgs
       then import ./nixpkgs {}
       # Pinned nixpkgs version; should be kept up-to-date with our submodule.
-      else import (fetchTarball https://github.com/NixOS/nixpkgs/archive/d00b5a5fa6fe8bdf7005abb06c46ae0245aec8b5.tar.gz) {}
+      else import (fetchTarball https://github.com/NixOS/nixpkgs/archive/9a5aa75d56ad4163521f1692469e6dc54b90068c.tar.gz) {}
diff --git a/survey/default.nix b/survey/default.nix
index 46d8066..68ad0e5 100644
--- a/survey/default.nix
+++ b/survey/default.nix
@@ -22,7 +22,7 @@ in
   ])."${approach}",
 
   # When changing this, also change the default version of Cabal declared below
-  compiler ? "ghc8104",
+  compiler ? "ghc8107",
 
   # See:
   # * https://www.snoyman.com/base/
@@ -38,6 +38,7 @@ in
       ghc881 = "Cabal_3_0_0_0";
       ghc8104 = "Cabal_3_2_1_0";
       ghc8105 = "Cabal_3_2_1_0";
+      ghc8107 = "Cabal_3_2_1_0";
       ghc901 = "Cabal_3_4_0_0";
     }."${compiler}"),
 
  • call e.g. nix-build --no-link survey/default.nix -A working.postgrest

That will give the same errors, at least at the start.

Possibly related: nh2/static-haskell-nix#111

@robx robx mentioned this pull request Jun 7, 2022
@robx
Copy link
Contributor

robx commented Jun 10, 2022

I managed to hack this to work on #2292 by patching static-haskell-nix: 2c24493

@robx
Copy link
Contributor

robx commented Jun 14, 2022

This upgrade has been done in #2292 (including this PR's updated openssl patch, thanks for that!).

@robx robx closed this Jun 14, 2022
@wolfgangwalther wolfgangwalther deleted the nix/update branch February 24, 2024 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants