mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
80 lines
1.7 KiB
Nix
80 lines
1.7 KiB
Nix
{
|
|
lib,
|
|
fetchFromGitHub,
|
|
stdenv,
|
|
rustPlatform,
|
|
pop-gtk-theme,
|
|
adw-gtk3,
|
|
pkg-config,
|
|
libpulseaudio,
|
|
libinput,
|
|
udev,
|
|
openssl,
|
|
nixosTests,
|
|
nix-update-script,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "cosmic-settings-daemon";
|
|
version = "1.0.3";
|
|
|
|
# nixpkgs-update: no auto update
|
|
src = fetchFromGitHub {
|
|
owner = "pop-os";
|
|
repo = "cosmic-settings-daemon";
|
|
tag = "epoch-${finalAttrs.version}";
|
|
hash = "sha256-4BXsjcAzu4twwIGqHQ4jvewO5oUns6yqY1n26KbIygQ=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/battery.rs \
|
|
--replace-fail '/usr/share/sounds/Pop/' '${pop-gtk-theme}/share/sounds/Pop/'
|
|
substituteInPlace src/theme.rs \
|
|
--replace-fail '/usr/share/themes/adw-gtk3' '${adw-gtk3}/share/themes/adw-gtk3'
|
|
'';
|
|
|
|
cargoHash = "sha256-1YQ7eQ6L6OHvVihUUnZCDWXXtVOyaI1pFN7YD/OBcfo=";
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [
|
|
libinput
|
|
libpulseaudio
|
|
openssl
|
|
udev
|
|
];
|
|
|
|
makeFlags = [
|
|
"prefix=$(out)"
|
|
"CARGO_TARGET_DIR=target/${stdenv.hostPlatform.rust.cargoShortTarget}"
|
|
];
|
|
|
|
dontCargoInstall = true;
|
|
|
|
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-settings-daemon";
|
|
description = "Settings Daemon for the COSMIC Desktop Environment";
|
|
mainProgram = "cosmic-settings-daemon";
|
|
license = lib.licenses.gpl3Only;
|
|
teams = [ lib.teams.cosmic ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|