Merge pull request #86163 from worldofpeace/wallpaper-refactor

Gnome and Pantheon: install nixos wallpapers
This commit is contained in:
worldofpeace
2020-06-07 14:44:59 -04:00
committed by GitHub
7 changed files with 28 additions and 9 deletions

View File

@@ -3,12 +3,18 @@
let
mkNixBackground = { name, src, description }:
stdenv.mkDerivation {
let
pkg = stdenv.mkDerivation {
inherit name src;
dontUnpack = true;
installPhase = ''
# GNOME
mkdir -p $out/share/backgrounds/nixos
ln -s $src $out/share/backgrounds/nixos/${src.name}
# TODO: is this path still needed?
mkdir -p $out/share/artwork/gnome
ln -s $src $out/share/artwork/gnome/${src.name}
@@ -22,6 +28,11 @@ X-KDE-PluginInfo-Name=${name}
_EOF
'';
passthru = {
gnomeFilePath = "${pkg}/share/backgrounds/nixos/${src.name}";
kdeFilePath = "${pkg}/share/wallpapers/${name}/contents/images/${src.name}";
};
meta = with stdenv.lib; {
inherit description;
homepage = "https://github.com/NixOS/nixos-artwork";
@@ -29,6 +40,7 @@ _EOF
platforms = platforms.all;
};
};
in pkg;
in