From ffa6c12b29eab05364f2778a250d3060d45cf056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Sat, 13 Oct 2018 18:10:45 -0300 Subject: [PATCH] deepin-wallpapers: init at 1.7.5 --- .../deepin/deepin-wallpapers/default.nix | 41 +++++++++++++++++++ pkgs/desktops/deepin/default.nix | 1 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/desktops/deepin/deepin-wallpapers/default.nix diff --git a/pkgs/desktops/deepin/deepin-wallpapers/default.nix b/pkgs/desktops/deepin/deepin-wallpapers/default.nix new file mode 100644 index 000000000000..ed2c795fd9cb --- /dev/null +++ b/pkgs/desktops/deepin/deepin-wallpapers/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchFromGitHub, dde-api }: + +stdenv.mkDerivation rec { + name = "deepin-wallpapers-${version}"; + version = "1.7.5"; + + src = fetchFromGitHub { + owner = "linuxdeepin"; + repo = "deepin-wallpapers"; + rev = version; + sha256 = "0mfjkh81ci0gjwmgycrh32by7v9b73nyvyjbqd29ccpb8bpyyakn"; + }; + + nativeBuildInputs = [ dde-api.bin ]; + + postPatch = '' + sed -i -e "s:/usr/lib/deepin-api:${dde-api.bin}/lib/deepin-api:" Makefile + sed -i -e "s:/usr/share/wallpapers:$out/share/wallpapers:" Makefile + ''; + + installPhase = '' + mkdir -p $out/share/wallpapers/deepin + cp -a deepin/* deepin-community/* deepin-private/* $out/share/wallpapers/deepin + mkdir -p $out/var/cache + cp -a image-blur $out/var/cache + + # Suggested by upstream + mkdir -p $out/share/backgrounds/deepin + ln -s ../../wallpapers/deepin/Hummingbird_by_Shu_Le.jpg $out/share/backgrounds/deepin/desktop.jpg + ln -s $(echo -n $out/share/wallpapers/deepin/Hummingbird_by_Shu_Le.jpg | md5sum | cut -d " " -f 1).jpg \ + $out/var/cache/image-blur/$(echo -n $out/share/backgrounds/deepin/desktop.jpg | md5sum | cut -d " " -f 1).jpg + ''; + + meta = with stdenv.lib; { + description = "Wallpapers for Deepin Desktop Environment"; + homepage = https://github.com/linuxdeepin/deepin-wallpapers; + license = licenses.gpl3; + platforms = platforms.linux; + maintainers = [ maintainers.romildo ]; + }; +} diff --git a/pkgs/desktops/deepin/default.nix b/pkgs/desktops/deepin/default.nix index 1ef7177e94d4..225de83a3a5f 100644 --- a/pkgs/desktops/deepin/default.nix +++ b/pkgs/desktops/deepin/default.nix @@ -19,6 +19,7 @@ let inherit (pkgs.gnome3) libgee vte; wnck = pkgs.libwnck3; }; + deepin-wallpapers = callPackage ./deepin-wallpapers { }; dtkcore = callPackage ./dtkcore { }; dtkwm = callPackage ./dtkwm { }; dtkwidget = callPackage ./dtkwidget { };