Nix: use mold linker

This commit is contained in:
Mihai Fufezan 2024-09-19 18:53:34 +03:00
parent dfa1bd0cd4
commit 9856378384
Signed by: fufexan
SSH key fingerprint: SHA256:SdnKmEpJrDu1+2UO1QpB/Eg4HKcdDi6n+xSRqFNJVpg

View file

@ -1,6 +1,7 @@
{ {
lib, lib,
stdenv, stdenv,
stdenvAdapters,
pkg-config, pkg-config,
pkgconf, pkgconf,
makeWrapper, makeWrapper,
@ -46,11 +47,17 @@
enableNvidiaPatches ? false, enableNvidiaPatches ? false,
nvidiaPatches ? false, nvidiaPatches ? false,
hidpiXWayland ? false, hidpiXWayland ? false,
}: }: let
assert lib.assertMsg (!nvidiaPatches) "The option `nvidiaPatches` has been removed."; adapters = lib.flatten [
assert lib.assertMsg (!enableNvidiaPatches) "The option `enableNvidiaPatches` has been removed."; stdenvAdapters.useMoldLinker
assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been removed. Please refer https://wiki.hyprland.org/Configuring/XWayland"; ];
stdenv.mkDerivation {
customStdenv = builtins.foldl' (acc: adapter: adapter acc) stdenv adapters;
in
assert lib.assertMsg (!nvidiaPatches) "The option `nvidiaPatches` has been removed.";
assert lib.assertMsg (!enableNvidiaPatches) "The option `enableNvidiaPatches` has been removed.";
assert lib.assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been removed. Please refer https://wiki.hyprland.org/Configuring/XWayland";
customStdenv.mkDerivation {
pname = "hyprland${lib.optionalString debug "-debug"}"; pname = "hyprland${lib.optionalString debug "-debug"}";
inherit version; inherit version;