1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 dde-api,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "deepin-wallpapers";
10 version = "1.7.16";
11
12 src = fetchFromGitHub {
13 owner = "linuxdeepin";
14 repo = pname;
15 rev = version;
16 hash = "sha256-o5rg1l8N6Ch+BdBLp+HMbVBBvrTdRtn8NSgH/9AnB2Q=";
17 };
18
19 nativeBuildInputs = [ dde-api ];
20
21 postPatch = ''
22 substituteInPlace Makefile \
23 --replace /usr/lib/deepin-api/image-blur ${dde-api}/lib/deepin-api/image-blur
24 '';
25
26 installPhase = ''
27 runHook preInstall
28 mkdir -p $out/share/wallpapers/deepin
29 cp deepin/* $out/share/wallpapers/deepin
30 mkdir -p $out/share/wallpapers/image-blur
31 cp image-blur/* $out/share/wallpapers/image-blur
32 mkdir -p $out/share/backgrounds
33 ln -s $out/share/wallpapers/deepin/desktop.jpg $out/share/backgrounds/default_background.jpg
34 runHook postInstall
35 '';
36
37 meta = with lib; {
38 description = "Deepin-wallpapers provides wallpapers of dde";
39 homepage = "https://github.com/linuxdeepin/deepin-wallpapers";
40 license = with licenses; [
41 gpl3Plus
42 cc-by-sa-30
43 ];
44 platforms = platforms.linux;
45 teams = [ teams.deepin ];
46 };
47}