lol

Merge pull request #93712 from jtojnar/malcontent-0.8

malcontent: 0.7.0 → 0.8.0

authored by

Jan Tojnar and committed by
GitHub
5d3f240e 42820323

+58 -25
+4 -1
nixos/modules/services/desktops/malcontent.nix
··· 28 28 malcontent-ui 29 29 ]; 30 30 31 - services.dbus.packages = [ pkgs.malcontent ]; 31 + services.dbus.packages = [ 32 + # D-Bus services are in `out`, not the default `bin` output that would be picked up by `makeDbusConf`. 33 + pkgs.malcontent.out 34 + ]; 32 35 33 36 services.accounts-daemon.enable = true; 34 37
+34 -11
pkgs/development/libraries/malcontent/better-separation.patch
··· 1 + commit 363c5be465dd6dde35c3d31abd7b5cca9b1f3a9f 2 + Author: Jan Tojnar <jtojnar@gmail.com> 3 + Date: Thu Jul 23 18:49:03 2020 +0200 4 + 5 + Improve separation between malcontent and malcontent-ui packages 6 + 7 + These artefacts go into both packages by default: 8 + 9 + * malcontent-control – a CLI tool 10 + * PAM module 11 + * gettext locale data 12 + * help pages ✨ 13 + * AccountService/D-Bus interfaces 14 + * Polkit com.endlessm.ParentalControls rules and policy 15 + 16 + Items marked with ✨ will go to ui package, while the rest is installed with the base library. 17 + 18 + See also the packaging done by upstream in Endless: 19 + https://github.com/endlessm/malcontent/tree/5482b7eb99aee9b8c344629bc078e193d3c26ffc/debian 20 + 21 + Cannot upstream this since they are worried about maintainability: 22 + https://gitlab.freedesktop.org/pwithnall/malcontent/merge_requests/38#note_437946 23 + 1 24 diff --git a/meson.build b/meson.build 2 - index a6c477d..f7b2f0a 100644 25 + index 6e1dfa5..196350b 100644 3 26 --- a/meson.build 4 27 +++ b/meson.build 5 - @@ -125,8 +125,8 @@ test_env = [ 28 + @@ -123,9 +123,8 @@ test_env = [ 6 29 'LC_ALL=C.UTF-8', 7 30 ] 8 31 9 32 -subdir('accounts-service') 33 + -subdir('help') 10 34 if not get_option('use_system_libmalcontent') 11 35 + subdir('accounts-service') 12 36 subdir('libmalcontent') 13 37 else 14 38 libmalcontent_api_version = '0' 15 - @@ -137,11 +137,17 @@ endif 39 + @@ -136,11 +135,16 @@ endif 16 40 if get_option('ui').enabled() 17 41 subdir('libmalcontent-ui') 18 42 endif ··· 22 46 +endif 23 47 if get_option('ui').enabled() 24 48 subdir('malcontent-control') 25 - endif 26 - -subdir('pam') 49 + + subdir('help') 50 + +endif 27 51 +if not get_option('use_system_libmalcontent') 28 52 + subdir('pam') 29 - +endif 30 - subdir('po') 53 + + subdir('po') 54 + endif 55 + -subdir('pam') 56 + -subdir('po') 31 57 32 - -meson.add_install_script('build-aux/meson_post_install.py') 33 - +if get_option('ui').enabled() 34 - + meson.add_install_script('build-aux/meson_post_install.py') 35 - +endif 58 + meson.add_install_script('build-aux/meson_post_install.py')
+17 -12
pkgs/development/libraries/malcontent/default.nix
··· 3 3 , fetchpatch 4 4 , meson 5 5 , ninja 6 - , pkgconfig 6 + , pkg-config 7 7 , gobject-introspection 8 8 , wrapGAppsHook 9 9 , glib ··· 19 19 20 20 stdenv.mkDerivation rec { 21 21 pname = "malcontent"; 22 - version = "0.7.0"; 22 + version = "0.8.0"; 23 23 24 - outputs = [ "bin" "out" "dev" "man" "installedTests" ]; 24 + outputs = [ "bin" "out" "lib" "pam" "dev" "man" "installedTests" ]; 25 25 26 26 src = fetchFromGitLab { 27 27 domain = "gitlab.freedesktop.org"; 28 28 owner = "pwithnall"; 29 29 repo = pname; 30 30 rev = version; 31 - sha256 = "0lxakzj75pvpgwbjfyfkg0gyzvry00zhc9h9cd8f0wksg7mabzbh"; 31 + sha256 = "Y9HzysChzzmKW5PuCLm9AZ4oaBLMpB0I5NyZUOYFzm4="; 32 32 }; 33 33 34 34 patches = [ ··· 37 37 38 38 # Do not build things that are part of malcontent-ui package 39 39 ./better-separation.patch 40 - 41 - # Fix pam installed test 42 - # https://gitlab.freedesktop.org/pwithnall/malcontent/merge_requests/50 43 - (fetchpatch { 44 - url = "https://gitlab.freedesktop.org/pwithnall/malcontent/commit/5d102eeb0604e65fc977ca77d4b249e986e634cc.patch"; 45 - sha256 = "1vs35zfp2sa2rps5h1240h73kvlspmv7mfr6f8mcbzvhj1wgzw74"; 46 - }) 47 40 ]; 48 41 49 42 nativeBuildInputs = [ 50 43 meson 51 44 ninja 52 - pkgconfig 45 + pkg-config 53 46 gobject-introspection 54 47 wrapGAppsHook 55 48 ]; ··· 72 65 mesonFlags = [ 73 66 "-Dinstalled_tests=true" 74 67 "-Dinstalled_test_prefix=${placeholder "installedTests"}" 68 + "-Dpamlibdir=${placeholder "pam"}/lib/security" 75 69 "-Dui=disabled" 76 70 ]; 77 71 ··· 83 77 --replace "/bin/false" "${coreutils}/bin/false" 84 78 ''; 85 79 80 + postInstall = '' 81 + # `giDiscoverSelf` only picks up paths in `out` output. 82 + # This needs to be in `postInstall` so that it runs before 83 + # `gappsWrapperArgsHook` that runs as one of `preFixupPhases`. 84 + addToSearchPath GI_TYPELIB_PATH "$lib/lib/girepository-1.0" 85 + ''; 86 + 86 87 passthru = { 87 88 tests = { 88 89 installedTests = nixosTests.installed-tests.malcontent; ··· 90 91 }; 91 92 92 93 meta = with stdenv.lib; { 94 + # We need to install Polkit & AccountsService data files in `out` 95 + # but `buildEnv` only uses `bin` when both `bin` and `out` are present. 96 + outputsToInstall = [ "bin" "out" "man" ]; 97 + 93 98 description = "Parental controls library"; 94 99 homepage = "https://gitlab.freedesktop.org/pwithnall/malcontent"; 95 100 license = licenses.lgpl21Plus;
+3 -1
pkgs/development/libraries/malcontent/ui.nix
··· 3 3 , ninja 4 4 , pkg-config 5 5 , gobject-introspection 6 + , itstool 6 7 , wrapGAppsHook 7 8 , glib 8 9 , accountsservice ··· 20 21 21 22 inherit (malcontent) version src; 22 23 23 - outputs = [ "bin" "out" "dev" ]; 24 + outputs = [ "out" "lib" "dev" ]; 24 25 25 26 patches = [ 26 27 # Allow installing installed tests to a separate output. ··· 35 36 ninja 36 37 pkg-config 37 38 gobject-introspection 39 + itstool 38 40 desktop-file-utils 39 41 wrapGAppsHook 40 42 ];