mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
feedbackd-device-themes: init at 0.8.3
Separate it from `feedbackd` for the following reasons: - Previously the update script did not see this "package" and did not update it - Now we can run the test suite of `feedbackd-device-themes` - This allows a user to only change a device theme, while not recompiling `feedbackd` - Updating only `feedbackd-device-themes` would result in an awkward commit message where we would claim to update a seemingly non-existing package - Previous commits that updated both `feedbackd` and `feedbackd-device-themes` at the same time did not mention the update to `feedbackd-device-themes` in the title of the commit message - They are separate projects after all, with the only direct dependency between the two packages existing in the test suite of `feedbackd-device-themes` - [Most other distributions also package this package](https://repology.org/project/feedbackd-device-themes/versions) separately from feedbackd
This commit is contained in:
parent
2e24917e8f
commit
0302a2ace6
3 changed files with 63 additions and 11 deletions
|
@ -17,10 +17,15 @@ in
|
|||
Your user needs to be in the `feedbackd` group to trigger effects
|
||||
'';
|
||||
package = lib.mkPackageOption pkgs "feedbackd" { };
|
||||
theme-package = lib.mkPackageOption pkgs "feedbackd-device-themes" {
|
||||
nullable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
environment.systemPackages = [
|
||||
cfg.package
|
||||
] ++ (if cfg.theme-package != null then [ cfg.theme-package ] else [ ]);
|
||||
|
||||
services.dbus.packages = [ cfg.package ];
|
||||
services.udev.packages = [ cfg.package ];
|
||||
|
|
56
pkgs/by-name/fe/feedbackd-device-themes/package.nix
Normal file
56
pkgs/by-name/fe/feedbackd-device-themes/package.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitLab,
|
||||
meson,
|
||||
ninja,
|
||||
json-glib,
|
||||
feedbackd,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "feedbackd-device-themes";
|
||||
version = "0.8.3";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.freedesktop.org";
|
||||
owner = "agx";
|
||||
repo = "feedbackd-device-themes";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-z+A2G1g2gNfC0cVWUO/LT3QVvXeotcBd+5UEpEtcPfY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
json-glib # Provides json-glib-validate
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
feedbackd # Provides fbd-theme-validate
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
(lib.mesonOption "validate" (if finalAttrs.doCheck then "enabled" else "disabled"))
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Device specific feedback themes for Feedbackd";
|
||||
homepage = "https://gitlab.freedesktop.org/agx/feedbackd-device-themes";
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [
|
||||
pacman99
|
||||
Luflosi
|
||||
];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
})
|
|
@ -20,18 +20,10 @@
|
|||
dbus,
|
||||
gmobile,
|
||||
umockdev,
|
||||
feedbackd-device-themes,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
let
|
||||
themes = fetchFromGitLab {
|
||||
domain = "gitlab.freedesktop.org";
|
||||
owner = "agx";
|
||||
repo = "feedbackd-device-themes";
|
||||
rev = "v0.8.3";
|
||||
hash = "sha256-z+A2G1g2gNfC0cVWUO/LT3QVvXeotcBd+5UEpEtcPfY=";
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "feedbackd";
|
||||
version = "0.8.2";
|
||||
|
@ -93,7 +85,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
postInstall = ''
|
||||
mkdir -p $out/lib/udev/rules.d
|
||||
sed "s|/usr/libexec/|$out/libexec/|" < $src/data/90-feedbackd.rules > $out/lib/udev/rules.d/90-feedbackd.rules
|
||||
cp ${themes}/data/* $out/share/feedbackd/themes/
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue