about summary refs log tree commit diff
diff options
context:
space:
mode:
authorworldofpeace <worldofpeace@users.noreply.github.com>2019-01-19 13:51:21 -0500
committerworldofpeace <worldofpeace@users.noreply.github.com>2019-01-19 13:51:21 -0500
commitbaa4b0ca57bcafce50930cf5e03a472b89f5f8de (patch)
tree5b3eb52720a2578aa7132d866f613c6f25bd7ab4
parentbc312dc7ee644ebad2ea7aacdc1249851ecd759e (diff)
downloadnixlib-baa4b0ca57bcafce50930cf5e03a472b89f5f8de.tar
nixlib-baa4b0ca57bcafce50930cf5e03a472b89f5f8de.tar.gz
nixlib-baa4b0ca57bcafce50930cf5e03a472b89f5f8de.tar.bz2
nixlib-baa4b0ca57bcafce50930cf5e03a472b89f5f8de.tar.lz
nixlib-baa4b0ca57bcafce50930cf5e03a472b89f5f8de.tar.xz
nixlib-baa4b0ca57bcafce50930cf5e03a472b89f5f8de.tar.zst
nixlib-baa4b0ca57bcafce50930cf5e03a472b89f5f8de.zip
font-manager: switch to meson
-rw-r--r--pkgs/applications/misc/font-manager/correct-post-install.patch13
-rw-r--r--pkgs/applications/misc/font-manager/default.nix33
2 files changed, 30 insertions, 16 deletions
diff --git a/pkgs/applications/misc/font-manager/correct-post-install.patch b/pkgs/applications/misc/font-manager/correct-post-install.patch
new file mode 100644
index 000000000000..47e9800d2657
--- /dev/null
+++ b/pkgs/applications/misc/font-manager/correct-post-install.patch
@@ -0,0 +1,13 @@
+diff --git a/meson_post_install.py b/meson_post_install.py
+index 8d00e70..c28d19e 100644
+--- a/meson_post_install.py
++++ b/meson_post_install.py
+@@ -7,7 +7,7 @@ prefix = environ['MESON_INSTALL_PREFIX']
+ data_dir = path.join(prefix, 'share')
+ schema_dir = path.join(data_dir, 'glib-2.0', 'schemas')
+ 
+-if not environ['DESTDIR']:
++if not environ.get('DESTDIR'):
+     print('Compiling gsettings schemas...')
+     call(['glib-compile-schemas', schema_dir])
+     print('Updating desktop database...')
diff --git a/pkgs/applications/misc/font-manager/default.nix b/pkgs/applications/misc/font-manager/default.nix
index eaaac0035980..7eb698321c57 100644
--- a/pkgs/applications/misc/font-manager/default.nix
+++ b/pkgs/applications/misc/font-manager/default.nix
@@ -1,11 +1,10 @@
-{ stdenv, fetchFromGitHub, automake, autoconf, libtool,
-  pkgconfig, file, libxml2, json-glib , sqlite, itstool,
-  librsvg, vala, gnome3, wrapGAppsHook, gobject-introspection,
-  which
+{ stdenv, fetchFromGitHub, meson, ninja, gettext, python3,
+  pkgconfig, libxml2, json-glib , sqlite, itstool, librsvg,
+  vala, gnome3, desktop-file-utils, wrapGAppsHook, gobject-introspection
 }:
 
 stdenv.mkDerivation rec {
-  name = "font-manager-${version}";
+  pname = "font-manager";
   version = "0.7.4.1";
 
   src = fetchFromGitHub {
@@ -17,10 +16,12 @@ stdenv.mkDerivation rec {
 
   nativeBuildInputs = [
     pkgconfig
-    automake autoconf libtool
-    file
-    which
+    meson
+    ninja
+    gettext
+    python3
     itstool
+    desktop-file-utils
     vala
     gnome3.yelp-tools
     wrapGAppsHook
@@ -37,17 +38,17 @@ stdenv.mkDerivation rec {
     gnome3.defaultIconTheme
   ];
 
-  enableParallelBuilding = true;
+  patches = [ ./correct-post-install.patch ];
 
-  preConfigure = ''
-    NOCONFIGURE=true ./autogen.sh
-    substituteInPlace configure --replace "/usr/bin/file" "${file}/bin/file"
-  '';
-
-  configureFlags = [
-    "--disable-pycompile"
+  mesonFlags = [
+    "-Ddisable_pycompile=true"
   ];
 
+  postPatch = ''
+    chmod +x meson_post_install.py
+    patchShebangs meson_post_install.py
+  '';
+
   meta = {
     homepage = https://fontmanager.github.io/;
     description = "Simple font management for GTK+ desktop environments";