@@ -3,7 +3,7 @@
33, fetchpatch
44, meson
55, ninja
6−, pkgconfig
6+, pkg-config
77, gobject-introspection
88, wrapGAppsHook
99, glib
@@ -19,16 +19,16 @@
1919
2020stdenv.mkDerivation rec {
2121 pname = "malcontent";
22− version = "0.7.0";
22+ version = "0.8.0";
2323
24− outputs = [ "bin" "out" "dev" "man" "installedTests" ];
24+ outputs = [ "bin" "out" "lib" "pam" "dev" "man" "installedTests" ];
2525
2626 src = fetchFromGitLab {
2727 domain = "gitlab.freedesktop.org";
2828 owner = "pwithnall";
2929 repo = pname;
3030 rev = version;
31− sha256 = "0lxakzj75pvpgwbjfyfkg0gyzvry00zhc9h9cd8f0wksg7mabzbh";
31+ sha256 = "Y9HzysChzzmKW5PuCLm9AZ4oaBLMpB0I5NyZUOYFzm4=";
3232 };
3333
3434 patches = [
@@ -37,19 +37,12 @@ stdenv.mkDerivation rec {
3737
3838 # Do not build things that are part of malcontent-ui package
3939 ./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− })
4740 ];
4841
4942 nativeBuildInputs = [
5043 meson
5144 ninja
52− pkgconfig
45+ pkg-config
5346 gobject-introspection
5447 wrapGAppsHook
5548 ];
@@ -72,6 +65,7 @@ stdenv.mkDerivation rec {
7265 mesonFlags = [
7366 "-Dinstalled_tests=true"
7467 "-Dinstalled_test_prefix=${placeholder "installedTests"}"
68+ "-Dpamlibdir=${placeholder "pam"}/lib/security"
7569 "-Dui=disabled"
7670 ];
7771
@@ -83,6 +77,13 @@ stdenv.mkDerivation rec {
8377 --replace "/bin/false" "${coreutils}/bin/false"
8478 '';
8579
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+
8687 passthru = {
8788 tests = {
8889 installedTests = nixosTests.installed-tests.malcontent;
@@ -90,6 +91,10 @@ stdenv.mkDerivation rec {
9091 };
9192
9293 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+
9398 description = "Parental controls library";
9499 homepage = "https://gitlab.freedesktop.org/pwithnall/malcontent";
95100 license = licenses.lgpl21Plus;