summary refs log tree commit diff
path: root/pkgs/desktops/pantheon/apps/switchboard-plugs/pantheon-shell/default.nix
blob: 35dd958483d6f8b3d92aadba90ea8dc798840ab5 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{ stdenv, fetchFromGitHub, pantheon, meson, ninja, pkgconfig, vala, glib
, libgee, granite, gexiv2, elementary-settings-daemon, gtk3, gnome-desktop
, gala, wingpanel, plank, switchboard, gettext, bamf, fetchpatch }:

stdenv.mkDerivation rec {
  pname = "switchboard-plug-pantheon-shell";
  version = "2.8.1";

  src = fetchFromGitHub {
    owner = "elementary";
    repo = pname;
    rev = version;
    sha256 = "1vrnzxqzl84k8gbrais4j1jyap10kvil4cr769jpr3q3bkbblwrw";
  };

  passthru = {
    updateScript = pantheon.updateScript {
      repoName = pname;
    };
  };

  nativeBuildInputs = [
    gettext
    meson
    ninja
    pkgconfig
    vala
  ];

  buildInputs = [
    bamf
    elementary-settings-daemon
    gexiv2
    glib
    gnome-desktop
    granite
    gtk3
    libgee
    plank
    switchboard
  ];

  patches = [
    ./backgrounds.patch # Having https://github.com/elementary/switchboard-plug-pantheon-shell/issues/166 would make this patch uneeded
    ./hardcode-gsettings.patch
    # Fixes https://github.com/elementary/switchboard-plug-pantheon-shell/issues/172
    (fetchpatch {
      url = "https://github.com/elementary/switchboard-plug-pantheon-shell/commit/e4f86df6a6be402db4c979a4b005573618b744d1.patch";
      sha256 = "0sa8611k6sqg96mnp2plmxd30w6zq76bfwszl8ankr9kwsgyc66y";
    })
  ];

  postPatch = ''
    substituteInPlace src/Views/Appearance.vala \
      --subst-var-by GALA_GSETTINGS_PATH ${glib.getSchemaPath gala}
    substituteInPlace src/Views/Appearance.vala \
      --subst-var-by WINGPANEL_GSETTINGS_PATH ${glib.getSchemaPath wingpanel}
  '';


  PKG_CONFIG_SWITCHBOARD_2_0_PLUGSDIR = "${placeholder "out"}/lib/switchboard";

  meta = with stdenv.lib; {
    description = "Switchboard Desktop Plug";
    homepage = https://github.com/elementary/switchboard-plug-pantheon-shell;
    license = licenses.gpl3Plus;
    platforms = platforms.linux;
    maintainers = pantheon.maintainers;
  };
}