From ea27ed76400eaf70745dedbe0f22031425980bd9 Mon Sep 17 00:00:00 2001 From: Gavin John Date: Fri, 5 Dec 2025 14:47:39 -0800 Subject: [PATCH] Revert "libcosmicAppHook: use RUSTFLAGS instead of platform specific flags" This reverts commit d2c62217d3748a3ff8ac8d6c9281cb05f92ae641. This is no longer needed in staging due to the proper fix https://github.com/NixOS/nixpkgs/pull/464707 having been merged --- pkgs/by-name/li/libcosmicAppHook/libcosmic-app-hook.sh | 6 +----- pkgs/by-name/li/libcosmicAppHook/package.nix | 5 +---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/pkgs/by-name/li/libcosmicAppHook/libcosmic-app-hook.sh b/pkgs/by-name/li/libcosmicAppHook/libcosmic-app-hook.sh index 7245d51495c05..e6a5231919564 100644 --- a/pkgs/by-name/li/libcosmicAppHook/libcosmic-app-hook.sh +++ b/pkgs/by-name/li/libcosmicAppHook/libcosmic-app-hook.sh @@ -15,11 +15,7 @@ libcosmicAppVergenHook() { libcosmicAppLinkerArgsHook() { # Force linking to certain libraries like libEGL, which are always dlopen()ed - # local flags="CARGO_TARGET_@cargoLinkerVar@_RUSTFLAGS" - - # Temporarily use this simpler solution, it should work for simple cross compilation - # https://github.com/NixOS/nixpkgs/issues/464392 - local flags="RUSTFLAGS" + local flags="CARGO_TARGET_@cargoLinkerVar@_RUSTFLAGS" export "$flags"="${!flags-} -C link-arg=-Wl,--push-state,--no-as-needed" # shellcheck disable=SC2043 diff --git a/pkgs/by-name/li/libcosmicAppHook/package.nix b/pkgs/by-name/li/libcosmicAppHook/package.nix index 150bfd6797623..f3042e13ac8ef 100644 --- a/pkgs/by-name/li/libcosmicAppHook/package.nix +++ b/pkgs/by-name/li/libcosmicAppHook/package.nix @@ -55,10 +55,7 @@ makeSetupHook { lib.makeSearchPath "share" ( lib.optionals includeSettings [ fallbackThemes ] ++ [ targetPackages.cosmic-icons ] ); - # Temporarily using RUSTFLAGS: https://github.com/NixOS/nixpkgs/issues/464392 - # See ./libcosmic-app-hook.sh - # cargoLinkerVar = targetPackages.stdenv.hostPlatform.rust.cargoEnvVarTarget; - + cargoLinkerVar = targetPackages.stdenv.hostPlatform.rust.cargoEnvVarTarget; # force linking for all libraries that may be dlopen'd by libcosmic/iced apps cargoLinkLibs = lib.escapeShellArgs ( [