mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-18 05:47:54 +08:00
experiment empty libgcc_eh
This commit is contained in:
+2
-1
@@ -9,7 +9,7 @@ let
|
||||
|
||||
pkgs = import (fetchTarball "https://github.com/nixos/nixpkgs/archive/nixos-unstable.tar.gz") {
|
||||
crossSystem = {
|
||||
inherit isStatic;
|
||||
isStatic = true;
|
||||
config = target;
|
||||
};
|
||||
};
|
||||
@@ -47,6 +47,7 @@ let
|
||||
pkg-config = pkgs.pkg-config;
|
||||
buildNoDefaultFeatures = !defaultFeatures;
|
||||
buildFeatures = lib.strings.splitString "," features;
|
||||
binutils = pkgs.binutils;
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
+18
-1
@@ -12,8 +12,24 @@
|
||||
, gpgme
|
||||
, buildNoDefaultFeatures ? false
|
||||
, buildFeatures ? [ ]
|
||||
, binutils
|
||||
}:
|
||||
|
||||
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
|
||||
"${lib.getExe' binutils "ar"}" r "$out"/lib/libgcc_eh.a
|
||||
'';
|
||||
};
|
||||
in
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
inherit buildNoDefaultFeatures buildFeatures;
|
||||
|
||||
@@ -42,7 +58,8 @@ rustPlatform.buildRustPackage rec {
|
||||
++ lib.optional (installManPages || installShellCompletions) installShellFiles;
|
||||
|
||||
buildInputs = [ ]
|
||||
++ lib.optionals hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security ])
|
||||
++ lib.optionals hostPlatform.isWindows empty-libgcc_eh
|
||||
++ lib.optionals hostPlatform.isDarwin (with darwin.apple_sdk_11_0.frameworks; [ Security ])
|
||||
++ lib.optional (builtins.elem "notmuch" buildFeatures) notmuch
|
||||
++ lib.optional (builtins.elem "pgp-gpg" buildFeatures) gpgme;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user