libdbusmenu: remove unnecessary ? null from inputs, remove global with lib

This commit is contained in:
Sandro Jäckel 2022-11-27 22:27:50 +01:00
parent ceee02670c
commit 75989afb35
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -2,9 +2,8 @@
, pkg-config, intltool
, glib, dbus-glib, json-glib
, gobject-introspection, vala
, gtkVersion ? null, gtk2 ? null, gtk3 ? null }:
with lib;
, gtkVersion ? null, gtk2, gtk3
}:
stdenv.mkDerivation rec {
pname = "libdbusmenu-${if gtkVersion == null then "glib" else "gtk${gtkVersion}"}";
@ -19,7 +18,7 @@ stdenv.mkDerivation rec {
buildInputs = [
glib dbus-glib json-glib
] ++ optional (gtkVersion != null) (if gtkVersion == "2" then gtk2 else gtk3);
] ++ lib.optional (gtkVersion != null) (if gtkVersion == "2" then gtk2 else gtk3);
postPatch = ''
for f in {configure,ltmain.sh,m4/libtool.m4}; do
@ -40,7 +39,7 @@ stdenv.mkDerivation rec {
"--localstatedir=/var"
(if gtkVersion == null then "--disable-gtk" else "--with-gtk=${gtkVersion}")
"--disable-scrollkeeper"
] ++ optional (gtkVersion != "2") "--disable-dumper";
] ++ lib.optional (gtkVersion != "2") "--disable-dumper";
doCheck = false; # generates shebangs in check phase, too lazy to fix
@ -50,7 +49,7 @@ stdenv.mkDerivation rec {
"typelibdir=${placeholder "out"}/lib/girepository-1.0"
];
meta = {
meta = with lib; {
description = "Library for passing menu structures across DBus";
homepage = "https://launchpad.net/dbusmenu";
license = with licenses; [ gpl3 lgpl21 lgpl3 ];