mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
Refactored cosmic packages to follow a consistent attribute sorting order Signed-off-by: Kajus Naujokaitis <kajusn@gmail.com>
107 lines
2.2 KiB
Nix
107 lines
2.2 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
rustPlatform,
|
|
libcosmicAppHook,
|
|
cmake,
|
|
just,
|
|
cosmic-randr,
|
|
libinput,
|
|
linux-pam,
|
|
udev,
|
|
coreutils,
|
|
xkeyboard_config,
|
|
nix-update-script,
|
|
nixosTests,
|
|
orca,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "cosmic-greeter";
|
|
version = "1.1.0";
|
|
|
|
# nixpkgs-update: no auto update
|
|
src = fetchFromGitHub {
|
|
owner = "pop-os";
|
|
repo = "cosmic-greeter";
|
|
tag = "epoch-${finalAttrs.version}";
|
|
hash = "sha256-oxXCAvBISkZu76VpvQ9AliFRJ8r5Ay7mjWf4sEwV0Xs=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/greeter.rs --replace-fail '/usr/bin/env' '${lib.getExe' coreutils "env"}'
|
|
substituteInPlace src/greeter.rs --replace-fail '/usr/bin/orca' '${lib.getExe orca}'
|
|
'';
|
|
|
|
cargoHash = "sha256-mfY2hsMxBooRjmTB2jgUIKyKHBpGfZ9Qslwv+2aEQyg=";
|
|
|
|
cargoBuildFlags = [ "--all" ];
|
|
|
|
separateDebugInfo = true;
|
|
__structuredAttrs = true;
|
|
|
|
env.VERGEN_GIT_SHA = finalAttrs.src.tag;
|
|
|
|
nativeBuildInputs = [
|
|
rustPlatform.bindgenHook
|
|
cmake
|
|
just
|
|
libcosmicAppHook
|
|
];
|
|
|
|
buildInputs = [
|
|
cosmic-randr
|
|
libinput
|
|
linux-pam
|
|
udev
|
|
orca
|
|
];
|
|
|
|
dontUseJustBuild = true;
|
|
dontUseJustCheck = true;
|
|
|
|
justFlags = [
|
|
"--set"
|
|
"prefix"
|
|
(placeholder "out")
|
|
"--set"
|
|
"cargo-target-dir"
|
|
"target/${stdenv.hostPlatform.rust.cargoShortTarget}"
|
|
];
|
|
|
|
preFixup = ''
|
|
libcosmicAppWrapperArgs+=(
|
|
--prefix PATH : ${lib.makeBinPath [ cosmic-randr ]}
|
|
--set-default X11_BASE_RULES_XML ${xkeyboard_config}/share/X11/xkb/rules/base.xml
|
|
--set-default X11_BASE_EXTRA_RULES_XML ${xkeyboard_config}/share/X11/xkb/rules/extra.xml
|
|
)
|
|
'';
|
|
|
|
passthru = {
|
|
tests = {
|
|
inherit (nixosTests)
|
|
cosmic
|
|
cosmic-autologin
|
|
cosmic-noxwayland
|
|
cosmic-autologin-noxwayland
|
|
;
|
|
};
|
|
|
|
updateScript = nix-update-script {
|
|
extraArgs = [
|
|
"--version-regex"
|
|
"epoch-(.*)"
|
|
];
|
|
};
|
|
};
|
|
|
|
meta = {
|
|
homepage = "https://github.com/pop-os/cosmic-greeter";
|
|
description = "Greeter for the COSMIC Desktop Environment";
|
|
mainProgram = "cosmic-greeter";
|
|
license = lib.licenses.gpl3Only;
|
|
teams = [ lib.teams.cosmic ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|