about summary refs log tree commit diff
path: root/nixpkgs/pkgs/desktops/cinnamon/mint-artwork/default.nix
blob: abc7c172cb776fa0b29026d9ef02652b42e3f432 (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
44
45
46
47
48
{ stdenv
, lib
, fetchurl
, glib
, nixos-artwork
}:

stdenv.mkDerivation rec {
  pname = "mint-artwork";
  version = "1.5.4";

  src = fetchurl {
    url = "http://packages.linuxmint.com/pool/main/m/mint-artwork/mint-artwork_${version}.tar.xz";
    hash = "sha256-ZRJK1fzIF36BdUlVhLwdFdfgQvN2ashzjgpCxoOIbK8=";
  };

  nativeBuildInputs = [
    glib
  ];

  installPhase = ''
    mkdir $out

    # note: we fuck up a bunch of stuff but idc
    find . -type f -exec sed -i \
      -e s,/usr/share/backgrounds/linuxmint/default_background.jpg,${nixos-artwork.wallpapers.simple-dark-gray}/share/artwork/gnome/nix-wallpaper-simple-dark-gray.png,g \
      -e s,/usr/share,$out/share,g \
      -e s,DMZ-White,Vanilla-DMZ,g \
      -e s,DMZ-Black,Vanilla-DMZ-AA,g \
      -e s,linuxmint-logo-5,cinnamon-symbolic,g \
      -e s,^theme-name=Mint-X$,theme-name=Mint-X-Dark,g \
      {} +

    # fixup broken symlink
    ln -sf ./sele_ring.jpg usr/share/backgrounds/linuxmint/default_background.jpg

    mv etc $out/etc
    mv usr/share $out/share
  '';

  meta = with lib; {
    homepage = "https://github.com/linuxmint/mint-artwork";
    description = "Artwork for the cinnamon desktop";
    license = licenses.gpl3; # from debian/copyright
    platforms = platforms.linux;
    maintainers = teams.cinnamon.members;
  };
}