diff options
author | Daniƫl de Kok <me@danieldk.eu> | 2020-11-12 17:43:08 +0100 |
---|---|---|
committer | Peter Hoeg <peter@hoeg.com> | 2020-11-19 10:52:31 +0800 |
commit | a0bbcb7632a674a44accf15be6b2ec43add4c1a6 (patch) | |
tree | 85239f87e123bdcdfdfa16748bda71e42ff7a5f8 /pkgs/data/misc | |
parent | 7c8451d51c70229b59d6cc4d0709c8290cec550e (diff) |
fedora-backgrounds.f33: init at 33.0.7
Diffstat (limited to 'pkgs/data/misc')
-rw-r--r-- | pkgs/data/misc/fedora-backgrounds/default.nix | 23 | ||||
-rw-r--r-- | pkgs/data/misc/fedora-backgrounds/f33-fix-xfce-path.patch | 15 | ||||
-rw-r--r-- | pkgs/data/misc/fedora-backgrounds/generic.nix | 42 |
3 files changed, 80 insertions, 0 deletions
diff --git a/pkgs/data/misc/fedora-backgrounds/default.nix b/pkgs/data/misc/fedora-backgrounds/default.nix new file mode 100644 index 000000000000..31bc28a9f9c1 --- /dev/null +++ b/pkgs/data/misc/fedora-backgrounds/default.nix @@ -0,0 +1,23 @@ +{ callPackage, lib, fetchurl }: + +let + fedoraBackground = callPackage ./generic.nix { }; +in { + f32 = fedoraBackground rec { + version = "32.2.2"; + src = fetchurl { + url = "https://github.com/fedoradesign/backgrounds/releases/download/v${version}/f${lib.versions.major version}-backgrounds-${version}.tar.xz"; + hash = "sha256-1F75aae7Jj7M2IPn/vWKcUF+O5mZ0Yey7hWuFj/4Fhg="; + }; + }; + + f33 = fedoraBackground rec { + version = "33.0.7"; + src = fetchurl { + url = "https://github.com/fedoradesign/backgrounds/releases/download/v${version}/f${lib.versions.major version}-backgrounds-${version}.tar.xz"; + hash = "sha256-lAn5diEYebCo2ZJCOn9rD87rOasUU0qnSOr0EnZKW4o="; + }; + # Fix broken symlinks in the Xfce background directory. + patches = [ ./f33-fix-xfce-path.patch ]; + }; +} diff --git a/pkgs/data/misc/fedora-backgrounds/f33-fix-xfce-path.patch b/pkgs/data/misc/fedora-backgrounds/f33-fix-xfce-path.patch new file mode 100644 index 000000000000..eabdacddaa53 --- /dev/null +++ b/pkgs/data/misc/fedora-backgrounds/f33-fix-xfce-path.patch @@ -0,0 +1,15 @@ +diff --git a/default/Makefile b/default/Makefile +index ec8095a..9391f8f 100644 +--- a/default/Makefile ++++ b/default/Makefile +@@ -48,8 +48,8 @@ install: + + #~ XFCE background + $(MKDIR) $(XFCE_BG_DIR) +- $(LN_S) ../default/$(WP_NAME)-02-day.png \ ++ $(LN_S) ../../backgrounds/$(WP_NAME)/default/$(WP_NAME)-02-day.png \ + $(XFCE_BG_DIR)/$(WP_NAME).png + for tod in 01-dawn 03-dusk 04-night; do \ +- $(LN_S) ../default/$(WP_NAME)-$${tod}.png $(XFCE_BG_DIR)/$(WP_NAME)-$${tod}.png; \ ++ $(LN_S) ../../backgrounds/$(WP_NAME)/default/$(WP_NAME)-$${tod}.png $(XFCE_BG_DIR)/$(WP_NAME)-$${tod}.png; \ + done; diff --git a/pkgs/data/misc/fedora-backgrounds/generic.nix b/pkgs/data/misc/fedora-backgrounds/generic.nix new file mode 100644 index 000000000000..25043c34e5d9 --- /dev/null +++ b/pkgs/data/misc/fedora-backgrounds/generic.nix @@ -0,0 +1,42 @@ +{ stdenv +, coreutils +}: + +{ version +, src +, patches ? [ ] +}: + +stdenv.mkDerivation { + inherit patches src version; + + pname = "fedora${stdenv.lib.versions.major version}-backgrounds"; + + dontBuild = true; + + postPatch = '' + for f in default/Makefile extras/Makefile; do + substituteInPlace $f \ + --replace "usr/share" "share" \ + --replace "/usr/bin/" "" \ + --replace "/bin/" "" + done + + for f in $(find . -name '*.xml'); do + substituteInPlace $f \ + --replace "/usr/share" "$out/share" + done; + ''; + + installFlags = [ + "DESTDIR=$(out)" + ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/fedoradesign/backgrounds"; + description = "A set of default and supplemental wallpapers for Fedora"; + license = licenses.cc-by-sa-40; + platforms = platforms.unix; + maintainers = with maintainers; [ danieldk ]; + }; +} |