push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,61 @@
commit 05666e70f1ef63632aea8b1aed84351a6e30d0d5
Author: Jan Tojnar <jtojnar@gmail.com>
Date: Thu Jul 23 18:49:03 2020 +0200
Improve separation between malcontent and malcontent-ui packages
These artefacts go into both packages by default:
* malcontent-control a CLI tool
* PAM module
* gettext locale data
* help pages ✨
* AccountService/D-Bus interfaces
* Polkit com.endlessm.ParentalControls rules and policy
Items marked with ✨ will go to ui package, while the rest is installed with the base library.
See also the packaging done by upstream in Endless:
https://github.com/endlessm/malcontent/tree/5482b7eb99aee9b8c344629bc078e193d3c26ffc/debian
Cannot upstream this since they are worried about maintainability:
https://gitlab.freedesktop.org/pwithnall/malcontent/merge_requests/38#note_437946
diff --git a/meson.build b/meson.build
index 038dd35..e3c77f0 100644
--- a/meson.build
+++ b/meson.build
@@ -123,9 +123,8 @@ test_env = [
'LC_ALL=C.UTF-8',
]
-subdir('accounts-service')
-subdir('help')
if not get_option('use_system_libmalcontent')
+ subdir('accounts-service')
subdir('libmalcontent')
else
libmalcontent_api_version = '0'
@@ -143,14 +142,19 @@ 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')
+ subdir('help')
gnome.post_install(
gtk_update_icon_cache: true,
update_desktop_database: true,
)
endif
-subdir('pam')
-subdir('po')
+if not get_option('use_system_libmalcontent')
+ subdir('pam')
+ subdir('po')
+endif

View File

@@ -0,0 +1,122 @@
{
lib,
stdenv,
fetchFromGitLab,
meson,
ninja,
pkg-config,
gobject-introspection,
wrapGAppsNoGuiHook,
glib,
coreutils,
accountsservice,
dbus,
pam,
polkit,
glib-testing,
python3,
nixosTests,
malcontent-ui,
}:
stdenv.mkDerivation rec {
pname = "malcontent";
version = "0.13.1";
outputs = [
"bin"
"out"
"lib"
"pam"
"dev"
"man"
"installedTests"
];
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "pwithnall";
repo = "malcontent";
rev = version;
hash = "sha256-ekRi4yXu8u8t1AjyS3bD6tdqqnqtKyI6yZs+28LnfRY=";
};
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 = [
meson
ninja
pkg-config
gobject-introspection
wrapGAppsNoGuiHook
];
buildInputs = [
accountsservice
dbus
pam
polkit
glib-testing
(python3.withPackages (
pp: with pp; [
pygobject3
]
))
];
propagatedBuildInputs = [
glib
];
mesonFlags = [
"-Dinstalled_tests=true"
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
"-Dpamlibdir=${placeholder "pam"}/lib/security"
"-Dui=disabled"
];
postPatch = ''
substituteInPlace libmalcontent/tests/app-filter.c \
--replace-fail "/usr/bin/true" "${coreutils}/bin/true" \
--replace-fail "/bin/true" "${coreutils}/bin/true" \
--replace-fail "/usr/bin/false" "${coreutils}/bin/false" \
--replace-fail "/bin/false" "${coreutils}/bin/false"
'';
postInstall = ''
# `giDiscoverSelf` only picks up paths in `out` output.
# This needs to be in `postInstall` so that it runs before
# `gappsWrapperArgsHook` that runs as one of `preFixupPhases`.
addToSearchPath GI_TYPELIB_PATH "$lib/lib/girepository-1.0"
'';
passthru = {
tests = {
installedTests = nixosTests.installed-tests.malcontent;
inherit malcontent-ui;
};
};
meta = with lib; {
# We need to install Polkit & AccountsService data files in `out`
# but `buildEnv` only uses `bin` when both `bin` and `out` are present.
outputsToInstall = [
"bin"
"out"
"man"
];
description = "Parental controls library";
mainProgram = "malcontent-client";
homepage = "https://gitlab.freedesktop.org/pwithnall/malcontent";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ jtojnar ];
inherit (polkit.meta) platforms badPlatforms;
};
}

View File

@@ -0,0 +1,56 @@
diff --git a/libmalcontent/tests/meson.build b/libmalcontent/tests/meson.build
index 610bc35..13e0713 100644
--- a/libmalcontent/tests/meson.build
+++ b/libmalcontent/tests/meson.build
@@ -72,9 +72,9 @@ test_programs = [
], deps],
]
-installed_tests_metadir = join_paths(datadir, 'installed-tests',
+installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests',
'libmalcontent-' + libmalcontent_api_version)
-installed_tests_execdir = join_paths(libexecdir, 'installed-tests',
+installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests',
'libmalcontent-' + libmalcontent_api_version)
foreach program: test_programs
@@ -105,4 +105,4 @@ foreach program: test_programs
env: envs,
args: ['--tap'],
)
-endforeach
\ No newline at end of file
+endforeach
diff --git a/meson_options.txt b/meson_options.txt
index d516c70..583cb94 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -4,6 +4,12 @@ option(
value: false,
description: 'enable installed tests'
)
+option(
+ 'installed_test_prefix',
+ type: 'string',
+ 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
+++ b/pam/tests/meson.build
@@ -12,9 +12,9 @@ test_programs = [
['pam_malcontent', [], deps],
]
-installed_tests_metadir = join_paths(datadir, 'installed-tests',
+installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests',
'libmalcontent-' + libmalcontent_api_version)
-installed_tests_execdir = join_paths(libexecdir, 'installed-tests',
+installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests',
'libmalcontent-' + libmalcontent_api_version)
foreach program: test_programs

View File

@@ -0,0 +1,83 @@
{
lib,
stdenv,
meson,
ninja,
pkg-config,
gobject-introspection,
itstool,
wrapGAppsHook4,
glib,
accountsservice,
dbus,
flatpak,
malcontent,
gtk4,
libadwaita,
appstream,
desktop-file-utils,
polkit,
glib-testing,
}:
stdenv.mkDerivation {
pname = "malcontent-ui";
inherit (malcontent) version src;
outputs = [
"out"
"lib"
"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
itstool
desktop-file-utils
wrapGAppsHook4
];
buildInputs = [
appstream
dbus
polkit
glib-testing
flatpak
];
propagatedBuildInputs = [
accountsservice
malcontent
glib
gtk4
libadwaita
];
mesonFlags = [
"-Dinstalled_tests=true"
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
"-Duse_system_libmalcontent=true"
"-Dui=enabled"
];
meta = with lib; {
description = "UI components for parental controls library";
mainProgram = "malcontent-control";
homepage = "https://gitlab.freedesktop.org/pwithnall/malcontent";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.unix;
};
}