malcontent-ui: split from malcontent
The 0.7.0 update allows us to split the package.
This commit is contained in:
parent
4b4c0164f0
commit
f3d1333f0d
6 changed files with 122 additions and 11 deletions
|
@ -23,7 +23,10 @@ with lib;
|
|||
|
||||
config = mkIf config.services.malcontent.enable {
|
||||
|
||||
environment.systemPackages = [ pkgs.malcontent ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
malcontent
|
||||
malcontent-ui
|
||||
];
|
||||
|
||||
services.dbus.packages = [ pkgs.malcontent ];
|
||||
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
diff --git a/meson.build b/meson.build
|
||||
index a6c477d..f7b2f0a 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -125,8 +125,8 @@ test_env = [
|
||||
'LC_ALL=C.UTF-8',
|
||||
]
|
||||
|
||||
-subdir('accounts-service')
|
||||
if not get_option('use_system_libmalcontent')
|
||||
+ subdir('accounts-service')
|
||||
subdir('libmalcontent')
|
||||
else
|
||||
libmalcontent_api_version = '0'
|
||||
@@ -137,11 +137,17 @@ endif
|
||||
if get_option('ui').enabled()
|
||||
subdir('libmalcontent-ui')
|
||||
endif
|
||||
-subdir('malcontent-client')
|
||||
+if not get_option('use_system_libmalcontent')
|
||||
+ subdir('malcontent-client')
|
||||
+endif
|
||||
if get_option('ui').enabled()
|
||||
subdir('malcontent-control')
|
||||
endif
|
||||
-subdir('pam')
|
||||
+if not get_option('use_system_libmalcontent')
|
||||
+ subdir('pam')
|
||||
+endif
|
||||
subdir('po')
|
||||
|
||||
-meson.add_install_script('build-aux/meson_post_install.py')
|
||||
+if get_option('ui').enabled()
|
||||
+ meson.add_install_script('build-aux/meson_post_install.py')
|
||||
+endif
|
|
@ -9,10 +9,7 @@
|
|||
, coreutils
|
||||
, accountsservice
|
||||
, dbus
|
||||
, flatpak
|
||||
, gtk3
|
||||
, pam
|
||||
, desktop-file-utils
|
||||
, polkit
|
||||
, glib-testing
|
||||
, python3
|
||||
|
@ -36,6 +33,9 @@ stdenv.mkDerivation rec {
|
|||
patches = [
|
||||
# Allow installing installed tests to a separate output.
|
||||
./installed-tests-path.patch
|
||||
|
||||
# Do not build things that are part of malcontent-ui package
|
||||
./better-separation.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
@ -43,15 +43,12 @@ stdenv.mkDerivation rec {
|
|||
ninja
|
||||
pkgconfig
|
||||
gobject-introspection
|
||||
desktop-file-utils
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
accountsservice
|
||||
dbus
|
||||
flatpak
|
||||
gtk3
|
||||
pam
|
||||
polkit
|
||||
glib-testing
|
||||
|
@ -67,6 +64,7 @@ stdenv.mkDerivation rec {
|
|||
mesonFlags = [
|
||||
"-Dinstalled_tests=true"
|
||||
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
||||
"-Dui=disabled"
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
|
|
@ -22,12 +22,12 @@ index 610bc35..13e0713 100644
|
|||
\ No newline at end of file
|
||||
+endforeach
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index 06329d4..72aa505 100644
|
||||
index d516c70..583cb94 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -9,3 +9,9 @@ option(
|
||||
type: 'string',
|
||||
description: 'directory for PAM modules'
|
||||
@@ -4,6 +4,12 @@ option(
|
||||
value: false,
|
||||
description: 'enable installed tests'
|
||||
)
|
||||
+option(
|
||||
+ 'installed_test_prefix',
|
||||
|
@ -35,6 +35,9 @@ index 06329d4..72aa505 100644
|
|||
+ value: '',
|
||||
+ description: 'Prefix for installed tests'
|
||||
+)
|
||||
option(
|
||||
'pamlibdir',
|
||||
type: 'string',
|
||||
diff --git a/pam/tests/meson.build b/pam/tests/meson.build
|
||||
index 0560dcb..a74dab2 100644
|
||||
--- a/pam/tests/meson.build
|
||||
|
|
70
pkgs/development/libraries/malcontent/ui.nix
Normal file
70
pkgs/development/libraries/malcontent/ui.nix
Normal file
|
@ -0,0 +1,70 @@
|
|||
{ stdenv
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, gobject-introspection
|
||||
, wrapGAppsHook
|
||||
, glib
|
||||
, accountsservice
|
||||
, dbus
|
||||
, flatpak
|
||||
, malcontent
|
||||
, gtk3
|
||||
, desktop-file-utils
|
||||
, polkit
|
||||
, glib-testing
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "malcontent-ui";
|
||||
|
||||
inherit (malcontent) version src;
|
||||
|
||||
outputs = [ "bin" "out" "dev" ];
|
||||
|
||||
patches = [
|
||||
# Allow installing installed tests to a separate output.
|
||||
./installed-tests-path.patch
|
||||
|
||||
# Do not build things that are part of malcontent package
|
||||
./better-separation.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
gobject-introspection
|
||||
desktop-file-utils
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
dbus
|
||||
polkit
|
||||
glib-testing
|
||||
flatpak
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
accountsservice
|
||||
malcontent
|
||||
glib
|
||||
gtk3
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Dinstalled_tests=true"
|
||||
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
||||
"-Duse_system_libmalcontent=true"
|
||||
"-Dui=enabled"
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "UI components for parental controls library";
|
||||
homepage = "https://gitlab.freedesktop.org/pwithnall/malcontent";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ jtojnar ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
|
@ -12962,6 +12962,8 @@ in
|
|||
|
||||
malcontent = callPackage ../development/libraries/malcontent { };
|
||||
|
||||
malcontent-ui = callPackage ../development/libraries/malcontent/ui.nix { };
|
||||
|
||||
libmanette = callPackage ../development/libraries/libmanette { };
|
||||
|
||||
libmatchbox = callPackage ../development/libraries/libmatchbox { };
|
||||
|
|
Loading…
Reference in a new issue