summary refs log tree commit diff
path: root/pkgs/data/misc/fedora-backgrounds/generic.nix
blob: 5ebc6ff367e98e4b78749c5077c8ef5137e4ba74 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ lib
, stdenvNoCC
, coreutils
}:

{ version
, src
, patches ? [ ]
}:

stdenvNoCC.mkDerivation {
  inherit patches src version;

  pname = "fedora${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 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; [ ];
  };
}