Skip to content

Commit d2c6221

Browse files
committed
libcosmicAppHook: use RUSTFLAGS instead of platform specific flags
This ensures these flags are picked up correctly, after latest rust update. We can revert this if we solve the root cause later. See #464392
1 parent 8046694 commit d2c6221

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

pkgs/by-name/li/libcosmicAppHook/libcosmic-app-hook.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ libcosmicAppVergenHook() {
1515

1616
libcosmicAppLinkerArgsHook() {
1717
# Force linking to certain libraries like libEGL, which are always dlopen()ed
18-
local flags="CARGO_TARGET_@cargoLinkerVar@_RUSTFLAGS"
18+
# local flags="CARGO_TARGET_@cargoLinkerVar@_RUSTFLAGS"
19+
20+
# Temporarily use this simpler solution, it should work for simple cross compilation
21+
# https://github.com/NixOS/nixpkgs/issues/464392
22+
local flags="RUSTFLAGS"
1923

2024
export "$flags"="${!flags-} -C link-arg=-Wl,--push-state,--no-as-needed"
2125
# shellcheck disable=SC2043

pkgs/by-name/li/libcosmicAppHook/package.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ makeSetupHook {
5555
lib.makeSearchPath "share" (
5656
lib.optionals includeSettings [ fallbackThemes ] ++ [ targetPackages.cosmic-icons ]
5757
);
58-
cargoLinkerVar = targetPackages.stdenv.hostPlatform.rust.cargoEnvVarTarget;
58+
# Temporarily using RUSTFLAGS: https://github.com/NixOS/nixpkgs/issues/464392
59+
# See ./libcosmic-app-hook.sh
60+
# cargoLinkerVar = targetPackages.stdenv.hostPlatform.rust.cargoEnvVarTarget;
61+
5962
# force linking for all libraries that may be dlopen'd by libcosmic/iced apps
6063
cargoLinkLibs = lib.escapeShellArgs (
6164
[

0 commit comments

Comments
 (0)