Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
71 lines
1.3 KiB
Nix
71 lines
1.3 KiB
Nix
{
|
|
wrapGAppsHook4,
|
|
glib,
|
|
lib,
|
|
stdenv,
|
|
xorg,
|
|
switchboard,
|
|
switchboardPlugs,
|
|
plugs,
|
|
# Only useful to disable for development testing.
|
|
useDefaultPlugs ? true,
|
|
testName ? null,
|
|
}:
|
|
|
|
let
|
|
selectedPlugs =
|
|
if plugs == null then
|
|
switchboardPlugs
|
|
else
|
|
plugs ++ (lib.optionals useDefaultPlugs switchboardPlugs);
|
|
|
|
testingName = lib.optionalString (testName != null) "${testName}-";
|
|
in
|
|
stdenv.mkDerivation {
|
|
pname = "${testingName}${switchboard.pname}-with-plugs";
|
|
inherit (switchboard) version;
|
|
|
|
src = null;
|
|
|
|
paths = [
|
|
switchboard
|
|
]
|
|
++ selectedPlugs;
|
|
|
|
passAsFile = [ "paths" ];
|
|
|
|
nativeBuildInputs = [
|
|
glib
|
|
wrapGAppsHook4
|
|
];
|
|
|
|
buildInputs = lib.forEach selectedPlugs (x: x.buildInputs) ++ selectedPlugs;
|
|
|
|
dontUnpack = true;
|
|
dontConfigure = true;
|
|
dontBuild = true;
|
|
|
|
preferLocalBuild = true;
|
|
allowSubstitutes = false;
|
|
|
|
installPhase = ''
|
|
mkdir -p $out
|
|
for i in $(cat $pathsPath); do
|
|
${xorg.lndir}/bin/lndir -silent $i $out
|
|
done
|
|
|
|
dbus_file="share/dbus-1/services/io.elementary.settings.service"
|
|
rm -f "$out/$dbus_file"
|
|
substitute "${switchboard}/$dbus_file" "$out/$dbus_file" \
|
|
--replace-fail "${switchboard}" "$out"
|
|
'';
|
|
|
|
preFixup = ''
|
|
gappsWrapperArgs+=(
|
|
--set SWITCHBOARD_PLUGS_PATH "$out/lib/switchboard-3"
|
|
)
|
|
'';
|
|
|
|
inherit (switchboard) meta;
|
|
}
|