fix: make static build work again
I copied the workaround from here: https://github.com/avdv/scalals/commit/a2de0eff59cb4c9be6f8a33b2957e31727f87b89 Properly fixing the issue upstream will be much more difficult. Closes: https://git.lix.systems/lix-project/lix/issues/527 Change-Id: I967d53fa9e80510b620df485af448f76bd9aa52a
This commit is contained in:
+16
-1
@@ -1,5 +1,6 @@
|
||||
# FIXME: upstream to nixpkgs (do NOT build with gcc due to gcc coroutine bugs)
|
||||
{
|
||||
binutils,
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
@@ -8,6 +9,20 @@
|
||||
zlib,
|
||||
}:
|
||||
assert stdenv.cc.isClang;
|
||||
let
|
||||
# HACK: work around https://github.com/NixOS/nixpkgs/issues/177129
|
||||
# Though this is an issue between Clang and GCC,
|
||||
# so it may not get fixed anytime soon...
|
||||
empty-libgcc_eh = stdenv.mkDerivation {
|
||||
pname = "empty-libgcc_eh";
|
||||
version = "0";
|
||||
dontUnpack = true;
|
||||
installPhase = ''
|
||||
mkdir -p "$out"/lib
|
||||
"${binutils}"/bin/ar r "$out"/lib/libgcc_eh.a
|
||||
'';
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "capnproto";
|
||||
version = "1.0.2";
|
||||
@@ -24,7 +39,7 @@ stdenv.mkDerivation rec {
|
||||
propagatedBuildInputs = [
|
||||
openssl
|
||||
zlib
|
||||
];
|
||||
] ++ lib.optional (stdenv.cc.isClang && stdenv.targetPlatform.isStatic) empty-libgcc_eh;
|
||||
|
||||
# FIXME: separate the binaries from the stuff that user systems actually use
|
||||
# This runs into a terrible UX issue in Lix and I just don't want to debug it
|
||||
|
||||
Reference in New Issue
Block a user