git.iko.soy/typeable/nixpkgs
on master help sign in
libmodulemd: 2.6.0 → 2.9.2
commitdead7ec1112aac6d685d963030643eac67fe898f authorJan Tojnar <jtojnar@gmail.com> dateSun 5 Apr 2020, 03:54 (7 years ago) parentc9d988b
3 files changed+40−53
pkgs/development/libraries/libmodulemd/default.nix+27−8 pkgs/development/libraries/libmodulemd/glib-devdoc.patch+13 pkgs/development/libraries/libmodulemd/pygobject-dir.patch−45
pkgs/development/libraries/libmodulemd/default.nix+27−8
@@ -1,46 +1,65 @@
11{ stdenv
2+, substituteAll
23, fetchFromGitHub
3−, pkgconfig
4+, fetchpatch
5+, pkg-config
46, meson
57, ninja
68, gobject-introspection
79, python3
810, libyaml
11+, rpm
12+, file
913, gtk-doc
10−, docbook_xsl
14+, docbook-xsl-nons
15+, help2man
1116, docbook_xml_dtd_412
1217, glib
1318}:
1419
1520stdenv.mkDerivation rec {
1621 pname = "libmodulemd";
17− version = "2.6.0";
22+ version = "2.9.2";
1823
19− outputs = [ "out" "devdoc" "py" ];
24+ outputs = [ "bin" "out" "dev" "devdoc" "man" "py" ];
2025
2126 src = fetchFromGitHub {
2227 owner = "fedora-modularity";
2328 repo = pname;
2429 rev = "${pname}-${version}";
25− sha256 = "0gizfmzs6jrzb29lwcimm5dq3027935xbzwgkbvbp67zcmjd3y5i";
30+ sha256 = "dm0uvzM5v1zDQVkonHbrT9l9ICnXZbCSiLRCMZRxhXY=";
2631 };
2732
2833 patches = [
29− ./pygobject-dir.patch
34+ # Use proper glib devdoc path.
35+ (substituteAll {
36+ src = ./glib-devdoc.patch;
37+ glib_devdoc = glib.devdoc;
38+ })
39+
40+ # Install pygobject overrides to our prefix instead of python3 one.
41+ # https://github.com/fedora-modularity/libmodulemd/pull/467
42+ (fetchpatch {
43+ url = "https://github.com/fedora-modularity/libmodulemd/commit/516cb64fd1488716a188add2715c8b3296960bd6.patch";
44+ sha256 = "ZWagkqKkD9CIkcYsKLtC0+qjLp80wH3taivUCn8jQbY=";
45+ })
3046 ];
3147
3248 nativeBuildInputs = [
33− pkgconfig
49+ pkg-config
3450 meson
3551 ninja
3652 gtk-doc
37− docbook_xsl
53+ docbook-xsl-nons
54+ help2man
3855 docbook_xml_dtd_412
3956 gobject-introspection
4057 ];
4158
4259 buildInputs = [
4360 libyaml
61+ rpm
62+ file # for libmagic
4463 glib
4564 ];
4665
pkgs/development/libraries/libmodulemd/glib-devdoc.patchnew file+13
@@ -0,0 +1,13 @@
1+diff --git a/meson.build b/meson.build
2+index a8b02b4..dd31a76 100644
3+--- a/meson.build
4++++ b/meson.build
5+@@ -67,7 +67,7 @@ test = find_program('test')
6+ with_docs = get_option('with_docs')
7+ if with_docs
8+ gtkdoc = dependency('gtk-doc')
9+- glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
10++ glib_docpath = join_paths('@glib_devdoc@', 'share', 'gtk-doc', 'html')
11+
12+ ret = run_command ([test, '-e', join_paths(glib_docpath, 'glib/index.html')])
13+ if ret.returncode() != 0
pkgs/development/libraries/libmodulemd/pygobject-dir.patchdeleted−45
@@ -1,45 +0,0 @@
1−diff --git a/bindings/python/meson.build b/bindings/python/meson.build
2−index 4358b79..61fd5a5 100644
3−--- a/bindings/python/meson.build
4−+++ b/bindings/python/meson.build
5−@@ -1,3 +1,5 @@
6−+pygobject_override_dir = get_option('pygobject_override_dir')
7−+
8− get_overridedir = '''
9− import os
10− import sysconfig
11−@@ -21,7 +23,7 @@ print(overridedir)
12− '''
13−
14− # Python 3
15−-if (get_option('with_py3_overrides'))
16−+if (get_option('with_py3_overrides')) and pygobject_override_dir == ''
17− ret = run_command([python3, '-c', get_overridedir])
18−
19− if ret.returncode() != 0
20−@@ -34,7 +36,7 @@ if (get_option('with_py3_overrides'))
21− endif
22−
23− # Python 2
24−-if (get_option('with_py2_overrides'))
25−+if (get_option('with_py2_overrides')) and pygobject_override_dir == ''
26− ret2 = run_command([python2, '-c', get_overridedir])
27−
28− if ret2.returncode() != 0
29−@@ -45,3 +47,7 @@ if (get_option('with_py2_overrides'))
30−
31− install_data('gi/overrides/Modulemd.py', install_dir: pygobject2_override_dir)
32− endif
33−+
34−+if pygobject_override_dir != ''
35−+ install_data('gi/overrides/Modulemd.py', install_dir: pygobject_override_dir)
36−+endif
37−diff --git a/meson_options.txt b/meson_options.txt
38−index 147419f..9071a04 100644
39−--- a/meson_options.txt
40−+++ b/meson_options.txt
41−@@ -18,3 +18,4 @@ option('skip_introspection', type : 'boolean', value : false)
42− option('python_name', type : 'string')
43− option('with_py2_overrides', type : 'boolean', value : false)
44− option('with_py3_overrides', type : 'boolean', value : true)
45−+option('pygobject_override_dir', type : 'string', value : '', description: 'Path to pygobject overrides directory')