Unverified Commit 8fb8721a authored by Bobby Rong's avatar Bobby Rong
Browse files
parent c5ae371f
Loading
Loading
Loading
Loading
+17 −23
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@
  stdenv,
  lib,
  fetchFromGitHub,
  fetchpatch,
  desktop-file-utils,
  gettext,
  libxml2,
@@ -11,7 +10,7 @@
  pkg-config,
  vala,
  wayland-scanner,
  wrapGAppsHook3,
  wrapGAppsHook4,
  at-spi2-core,
  gnome-settings-daemon,
  gnome-desktop,
@@ -19,7 +18,6 @@
  granite7,
  gtk3,
  gtk4,
  libcanberra,
  libgee,
  libhandy,
  mutter,
@@ -30,28 +28,15 @@

stdenv.mkDerivation rec {
  pname = "gala";
  version = "8.2.5";
  version = "8.3.0";

  src = fetchFromGitHub {
    owner = "elementary";
    repo = "gala";
    rev = version;
    hash = "sha256-uupFeQ73hr6ziLEtzgVJWASUxhspXJX54/U+3PLSCFY=";
    tag = version;
    hash = "sha256-omsAOOZCQINLTZQg3Sew+p84jv8+R2cHSVtcHFIeUBI=";
  };

  patches = [
    # We look for plugins in `/run/current-system/sw/lib/` because
    # there are multiple plugin providers (e.g. gala and wingpanel).
    ./plugins-dir.patch

    # Fix gtk3 daemon menu location with x2 scaling
    # https://github.com/elementary/gala/pull/2493
    (fetchpatch {
      url = "https://github.com/elementary/gala/commit/33bc3ebe7f175c61845feaf2d06083f1e3b64ddc.patch";
      hash = "sha256-hjjiKcO5o/OABKD8vUsVyqtNKN4ffEOGZntLceLr2+k=";
    })
  ];

  depsBuildBuild = [ pkg-config ];

  nativeBuildInputs = [
@@ -63,7 +48,7 @@ stdenv.mkDerivation rec {
    pkg-config
    vala
    wayland-scanner
    wrapGAppsHook3
    wrapGAppsHook4
  ];

  buildInputs = [
@@ -72,9 +57,8 @@ stdenv.mkDerivation rec {
    gnome-desktop
    granite
    granite7
    gtk3
    gtk4 # gala-daemon
    libcanberra
    gtk3 # daemon-gtk3
    gtk4
    libgee
    libhandy
    mutter
@@ -82,6 +66,16 @@ stdenv.mkDerivation rec {
    systemd
  ];

  postPatch = ''
    substituteInPlace meson.build \
      --replace-fail "conf.set('PLUGINDIR', plugins_dir)" "conf.set('PLUGINDIR','/run/current-system/sw/lib/gala/plugins')"
  '';

  mesonFlags = [
    # https://github.com/elementary/gala/commit/1e75d2a4b42e0d853fd474e90f1a52b0bcd0f690
    "-Dold-icon-groups=true"
  ];

  passthru = {
    updateScript = nix-update-script { };
  };
+0 −21
Original line number Diff line number Diff line
diff --git a/meson.build b/meson.build
index d0f00e5..977d2e2 100644
--- a/meson.build
+++ b/meson.build
@@ -25,6 +25,7 @@ vapi_dir = meson.current_source_dir() / 'vapi'
 locale_dir = join_paths(get_option('prefix'), get_option('localedir'))
 data_dir = join_paths(get_option('prefix'), get_option('datadir'))
 plugins_dir = join_paths(get_option('prefix'), get_option('libdir'), meson.project_name(), 'plugins')
+plugins_dir_for_build = join_paths('/run/current-system/sw/lib/', meson.project_name(), 'plugins')
 pkgdata_dir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
 pkglib_dir = join_paths(get_option('prefix'), get_option('libdir'), meson.project_name())
 
@@ -33,7 +34,7 @@ conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
 conf.set_quoted('LOCALEDIR', locale_dir)
 conf.set_quoted('DATADIR', data_dir)
 conf.set_quoted('PKGDATADIR', pkgdata_dir)
-conf.set_quoted('PLUGINDIR', plugins_dir)
+conf.set_quoted('PLUGINDIR', plugins_dir_for_build)
 conf.set_quoted('RESOURCEPATH', '/org/pantheon/desktop/gala')
 conf.set_quoted('VERSION', gala_version)
 conf.set_quoted('SCHEMA', 'org.pantheon.desktop.gala')