diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2020-04-27 22:35:31 -0400 |
---|---|---|
committer | worldofpeace <worldofpeace@protonmail.ch> | 2020-04-29 13:23:35 -0400 |
commit | 62587f43ddf884335f2ed0ee83673d9ffa9a2465 (patch) | |
tree | 83c9424c301557f6636a1e12555fa9623e8de0d3 /pkgs/data/misc/nixos-artwork | |
parent | 6a627c416fe663ac16064f7a155afba9522910e4 (diff) |
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.
Diffstat (limited to 'pkgs/data/misc/nixos-artwork')
-rw-r--r-- | pkgs/data/misc/nixos-artwork/wallpapers.nix | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/pkgs/data/misc/nixos-artwork/wallpapers.nix b/pkgs/data/misc/nixos-artwork/wallpapers.nix index a6a368e26e075..6e6b6e92678e1 100644 --- a/pkgs/data/misc/nixos-artwork/wallpapers.nix +++ b/pkgs/data/misc/nixos-artwork/wallpapers.nix @@ -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 |