nixos-artwork: add file path attributes

This makes things so much easier, and we install to
the path that both gnome-backgrounds and
elementary-wallpapers install to.
This commit is contained in:
worldofpeace
2020-04-29 13:23:35 -04:00
parent 6a627c416f
commit 62587f43dd
6 changed files with 24 additions and 8 deletions
+13 -1
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