diff options
author | cwyc <16950437+cwyc@users.noreply.github.com> | 2021-08-17 04:06:25 -0400 |
---|---|---|
committer | cwyc <16950437+cwyc@users.noreply.github.com> | 2021-10-20 12:45:54 -0400 |
commit | 35279a22be2a7b77aac802b54d6542733c7ebfce (patch) | |
tree | 5f02192343b4992024b59851a96246902086a451 /pkgs/desktops/gnome/core/gnome-backgrounds | |
parent | f01615c4649f47e03028e72db7bfb94c305edfe2 (diff) |
gnome-backgrounds: stable image paths
This patch makes the backgrounds database point to stable paths in /run/current-system/sw that don't decay whenever this package's hash changes.
Diffstat (limited to 'pkgs/desktops/gnome/core/gnome-backgrounds')
-rw-r--r-- | pkgs/desktops/gnome/core/gnome-backgrounds/default.nix | 7 | ||||
-rw-r--r-- | pkgs/desktops/gnome/core/gnome-backgrounds/stable-dir.patch | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/pkgs/desktops/gnome/core/gnome-backgrounds/default.nix b/pkgs/desktops/gnome/core/gnome-backgrounds/default.nix index 370cd14e46775..f7a39d92cfb47 100644 --- a/pkgs/desktops/gnome/core/gnome-backgrounds/default.nix +++ b/pkgs/desktops/gnome/core/gnome-backgrounds/default.nix @@ -13,6 +13,13 @@ stdenv.mkDerivation rec { updateScript = gnome.updateScript { packageName = "gnome-backgrounds"; attrPath = "gnome.gnome-backgrounds"; }; }; + patches = [ + # Makes the database point to stable paths in /run/current-system/sw/share, which don't decay whenever this package's hash changes. + # This assumes a nixos + gnome system, where this package is installed in environment.systemPackages, + # and /share outputs are included in environment.pathsToLink. + ./stable-dir.patch + ]; + nativeBuildInputs = [ meson ninja pkg-config gettext ]; meta = with lib; { diff --git a/pkgs/desktops/gnome/core/gnome-backgrounds/stable-dir.patch b/pkgs/desktops/gnome/core/gnome-backgrounds/stable-dir.patch new file mode 100644 index 0000000000000..cbc55e8a5c018 --- /dev/null +++ b/pkgs/desktops/gnome/core/gnome-backgrounds/stable-dir.patch @@ -0,0 +1,9 @@ +diff --git a/backgrounds/meson.build b/backgrounds/meson.build +index 2175a16..cf521df 100644 +--- a/backgrounds/meson.build ++++ b/backgrounds/meson.build +@@ -1,5 +1,5 @@ + dataconf = configuration_data() +-dataconf.set('BACKGROUNDDIR', backgrounddir) ++dataconf.set('BACKGROUNDDIR', '/run/current-system/sw/share/backgrounds/gnome') + dataconf.set('datadir', datadir) |