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

Incorrect zstd static flag #120

Closed
d-lapirov opened this issue Sep 7, 2023 · 3 comments
Closed

Incorrect zstd static flag #120

d-lapirov opened this issue Sep 7, 2023 · 3 comments

Comments

@d-lapirov
Copy link

d-lapirov commented Sep 7, 2023

I'm somewhat new to nix, but it seems like the option to build zstd statically should be static = true, not enableStatic = true.

I'm not sure that this is relevant here, but I'm building against unsable nixpkgs, as I need an ghc946.
Howerver I don't see zstd.enableStatic flag ever in the history of zstd/default.nix.

While trying to build my project I ended up with a patch to survey/default.nix with this content:

diff --git a/survey/default.nix b/survey/default.nix
index 4c451e4..f6f2c62 100644
--- a/survey/default.nix
+++ b/survey/default.nix
@@ -724,7 +724,7 @@ let
 
     openssl = previous.openssl.override { static = true; };
 
-    zstd = previous.zstd.override { enableStatic = true; };
+    zstd = previous.zstd.override { static = true; };
 
     libsass = previous.libsass.overrideAttrs (old: { dontDisableStatic = true; });

Only after patching survey I was able to build my project.

Is it something wrong on my side, and it should actually be enableStatic?
https://github.com/NixOS/nixpkgs/blob/4077a0e4ac3356222bc1f0a070af7939c3098535/pkgs/tools/compression/zstd/default.nix#L6

@nh2
Copy link
Owner

nh2 commented Sep 7, 2023

@teggotic
Copy link

teggotic commented Sep 7, 2023

This makes much more sense now. Thank you @nh2

Another question on this topic is that I need a GHC946 specifically, and the latest 94x one in your branch is 945.
I think I should create my own fork with your branch as base and copy everything related to ghc946 from the nixpkgs master, right?
Or you can suggest something different.

I hope I'm not taking too much of your time.

I've used the wrong account to create an issue 😝

@nh2
Copy link
Owner

nh2 commented Sep 12, 2023

@teggotic @d-lapirov

I need a GHC946 specifically, and the latest 94x one in your branch is 945.
I think I should create my own fork with your branch as base and copy everything related to ghc946 from the nixpkgs master, right?
Or you can suggest something different.

If I understand you right, you're saying that my pinned nixpkgs has ghc945 and you need ghc946 which is only in a newer nixpkgs.

In that case, you can do the following steps:

  • Rebase my patches which are in my nixpkgs submodule onto a newer nixpkgs which has the compiler version you need.
  • In a clone of my repo, update the submodule to that nixpkgs.
  • If everything builds nicely, you can also PR that update to this project :)

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

No branches or pull requests

3 participants