Revert "cosmic-launcher: use mold linker"
This mostly reverts commit 63a365d8ff.
I've left the deletion of the postPatch from the original commit stand
— it seems to have been included in the original commit by mistake
instead of being a separate commit, as it has nothing to do with mold.
In Nixpkgs, we consider the linker a property of the platform.
Individual packages should not be using toolchains other than the ones
that are part of the platform without a strong justification. In this
case, the only justification appears to have been that upstream uses
this linker. Just like we don't force every package whose upstream
happens to use Clang in their own builds to build with Clang in
Nixpkgs rather than the platform compiler, upstream's choice alone
isn't grounds for overriding the platform linker here.
This commit is contained in:
@@ -1,70 +1,64 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
stdenvAdapters,
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
just,
|
||||
libcosmicAppHook,
|
||||
nix-update-script,
|
||||
|
||||
withMoldLinker ? stdenv.targetPlatform.isLinux,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage.override
|
||||
{ stdenv = if withMoldLinker then stdenvAdapters.useMoldLinker stdenv else stdenv; }
|
||||
(finalAttrs: {
|
||||
pname = "cosmic-launcher";
|
||||
version = "1.0.0-alpha.6";
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "cosmic-launcher";
|
||||
version = "1.0.0-alpha.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pop-os";
|
||||
repo = "cosmic-launcher";
|
||||
tag = "epoch-${finalAttrs.version}";
|
||||
hash = "sha256-BtYnL+qkM/aw+Air5yOKH098V+TQByM5mh1DX7v+v+s=";
|
||||
};
|
||||
src = fetchFromGitHub {
|
||||
owner = "pop-os";
|
||||
repo = "cosmic-launcher";
|
||||
tag = "epoch-${finalAttrs.version}";
|
||||
hash = "sha256-BtYnL+qkM/aw+Air5yOKH098V+TQByM5mh1DX7v+v+s=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-g7Qr3C8jQg65KehXAhftdXCpEukag0w12ClvZFkxfqs=";
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-g7Qr3C8jQg65KehXAhftdXCpEukag0w12ClvZFkxfqs=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
just
|
||||
libcosmicAppHook
|
||||
nativeBuildInputs = [
|
||||
just
|
||||
libcosmicAppHook
|
||||
];
|
||||
|
||||
dontUseJustBuild = true;
|
||||
dontUseJustCheck = true;
|
||||
|
||||
justFlags = [
|
||||
"--set"
|
||||
"prefix"
|
||||
(placeholder "out")
|
||||
"--set"
|
||||
"bin-src"
|
||||
"target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-launcher"
|
||||
];
|
||||
|
||||
env."CARGO_TARGET_${stdenv.hostPlatform.rust.cargoEnvVarTarget}_RUSTFLAGS" = "--cfg tokio_unstable";
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version"
|
||||
"unstable"
|
||||
"--version-regex"
|
||||
"epoch-(.*)"
|
||||
];
|
||||
};
|
||||
|
||||
dontUseJustBuild = true;
|
||||
dontUseJustCheck = true;
|
||||
|
||||
justFlags = [
|
||||
"--set"
|
||||
"prefix"
|
||||
(placeholder "out")
|
||||
"--set"
|
||||
"bin-src"
|
||||
"target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-launcher"
|
||||
meta = {
|
||||
homepage = "https://github.com/pop-os/cosmic-launcher";
|
||||
description = "Launcher for the COSMIC Desktop Environment";
|
||||
mainProgram = "cosmic-launcher";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = with lib.maintainers; [
|
||||
nyabinary
|
||||
HeitorAugustoLN
|
||||
];
|
||||
|
||||
env."CARGO_TARGET_${stdenv.hostPlatform.rust.cargoEnvVarTarget}_RUSTFLAGS" =
|
||||
"--cfg tokio_unstable${lib.optionalString withMoldLinker " -C link-arg=-fuse-ld=mold"}";
|
||||
|
||||
passthru.updateScript = nix-update-script {
|
||||
extraArgs = [
|
||||
"--version"
|
||||
"unstable"
|
||||
"--version-regex"
|
||||
"epoch-(.*)"
|
||||
];
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/pop-os/cosmic-launcher";
|
||||
description = "Launcher for the COSMIC Desktop Environment";
|
||||
mainProgram = "cosmic-launcher";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = with lib.maintainers; [
|
||||
nyabinary
|
||||
HeitorAugustoLN
|
||||
];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user