From ec547685655ae440001cfffd67b84d24ac9c113e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20L=C3=B3pez?= Date: Tue, 30 Apr 2024 09:21:45 -0300 Subject: [PATCH] Use pkgsStatic for Linux pkgsMusl fails to build for some reason. --- flake.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 2ea1f1cb0..d1071ae29 100644 --- a/flake.nix +++ b/flake.nix @@ -18,7 +18,7 @@ pkgs = nixpkgs.legacyPackages.${system}; # prefer musl on Linux, static glibc + threading does not work properly # TODO: maybe only override it for echidna-redistributable? - pkgsStatic = if pkgs.stdenv.hostPlatform.isLinux then pkgs.pkgsMusl else pkgs; + pkgsStatic = if pkgs.stdenv.hostPlatform.isLinux then pkgs.pkgsStatic else pkgs; # this is not perfect for development as it hardcodes solc to 0.5.7, test suite runs fine though # would be great to integrate solc-select to be more flexible, improve this in future solc = pkgs.stdenv.mkDerivation { @@ -88,7 +88,7 @@ "--extra-lib-dirs=${stripDylib (gmp.override { withStatic = true; })}/lib" "--extra-lib-dirs=${stripDylib secp256k1-static}/lib" "--extra-lib-dirs=${stripDylib (libff.override { enableStatic = true; })}/lib" - "--extra-lib-dirs=${zlib.static}/lib" + "--extra-lib-dirs=${zlib.override { static = true; shared = false; }}/lib" "--extra-lib-dirs=${stripDylib (libffi.overrideAttrs (_: { dontDisableStatic = true; }))}/lib" "--extra-lib-dirs=${stripDylib (ncurses-static)}/lib" ] ++ (if stdenv.hostPlatform.isDarwin then [