diff options
author | Jan Malakhovski <oxij@oxij.org> | 2023-08-08 17:18:01 +0000 |
---|---|---|
committer | Anderson Torres <torres.anderson.85@protonmail.com> | 2023-08-11 09:20:44 +0000 |
commit | 591ccfe5b9bd6d9747c264a1aa5d324bc1cdc7dd (patch) | |
tree | 73149b019a95f280384d180b5b8165e7b11eedaa /pkgs/data/themes/mojave | |
parent | 979f71ba7c542928f8a7029c12da8c9ba16c2787 (diff) | |
download | nixlib-591ccfe5b9bd6d9747c264a1aa5d324bc1cdc7dd.tar nixlib-591ccfe5b9bd6d9747c264a1aa5d324bc1cdc7dd.tar.gz nixlib-591ccfe5b9bd6d9747c264a1aa5d324bc1cdc7dd.tar.bz2 nixlib-591ccfe5b9bd6d9747c264a1aa5d324bc1cdc7dd.tar.lz nixlib-591ccfe5b9bd6d9747c264a1aa5d324bc1cdc7dd.tar.xz nixlib-591ccfe5b9bd6d9747c264a1aa5d324bc1cdc7dd.tar.zst nixlib-591ccfe5b9bd6d9747c264a1aa5d324bc1cdc7dd.zip |
treewide: noop: refer to `src.name` or similar where appropriate, part 3: more use cases
This continues where d8f7f6a5cee067b81bfaaa3aa079adb94ed7c01e left off. Similarly to that commit, this commit this also points `sourceRoot`s to `src.name` and similar instead of keeping hardcoded names, and edits other derivation attrs do do the same, where appropriate. Also, similarly to d8f7f6a5cee067b81bfaaa3aa079adb94ed7c01e some of expressions this edits use `srcs` attribute with customly-named sources, so they have to be moved into `let` blocks to keep evaluation efficient (the other, worse, way to do this would to recurcively refer to `elemAt n finalAttrs.srcs` or, similarly, with `rec`).
Diffstat (limited to 'pkgs/data/themes/mojave')
-rw-r--r-- | pkgs/data/themes/mojave/default.nix | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkgs/data/themes/mojave/default.nix b/pkgs/data/themes/mojave/default.nix index 0e4bbdbe5aae..82256441fbb1 100644 --- a/pkgs/data/themes/mojave/default.nix +++ b/pkgs/data/themes/mojave/default.nix @@ -103,7 +103,7 @@ stdenvNoCC.mkDerivation rec { done ${lib.optionalString wallpapers '' - for f in ../wallpapers/Mojave{,-timed}.xml; do + for f in ../${wallpapers_src.name}/Mojave{,-timed}.xml; do substituteInPlace $f --replace /usr $out done ''} @@ -123,9 +123,9 @@ stdenvNoCC.mkDerivation rec { ${lib.optionalString wallpapers '' mkdir -p $out/share/backgrounds/Mojave mkdir -p $out/share/gnome-background-properties - cp -a ../wallpapers/Mojave*.jpeg $out/share/backgrounds/Mojave/ - cp -a ../wallpapers/Mojave-timed.xml $out/share/backgrounds/Mojave/ - cp -a ../wallpapers/Mojave.xml $out/share/gnome-background-properties/ + cp -a ../${wallpapers_src.name}/Mojave*.jpeg $out/share/backgrounds/Mojave/ + cp -a ../${wallpapers_src.name}/Mojave-timed.xml $out/share/backgrounds/Mojave/ + cp -a ../${wallpapers_src.name}/Mojave.xml $out/share/gnome-background-properties/ ''} # Replace duplicate files with soft links to the first file in each |