3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/malcontent/default.nix

92 lines
1.8 KiB
Nix
Raw Normal View History

2020-02-08 05:16:13 +00:00
{ stdenv
, fetchFromGitLab
, meson
, ninja
, pkgconfig
, gobject-introspection
, wrapGAppsHook
, glib
, coreutils
, accountsservice
2020-02-08 05:16:13 +00:00
, dbus
, pam
2020-02-08 05:16:13 +00:00
, polkit
, glib-testing
, python3
, nixosTests
}:
stdenv.mkDerivation rec {
pname = "malcontent";
version = "0.7.0";
2020-02-08 05:16:13 +00:00
outputs = [ "bin" "out" "dev" "man" "installedTests" ];
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "pwithnall";
repo = pname;
rev = version;
sha256 = "cP2l6nl6cuBQYwkmBj8APu/vH3jTeScXf3ffcuSfqlM=";
2020-02-08 05:16:13 +00:00
};
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
2020-02-08 05:16:13 +00:00
];
nativeBuildInputs = [
meson
ninja
pkgconfig
gobject-introspection
wrapGAppsHook
];
buildInputs = [
accountsservice
2020-02-08 05:16:13 +00:00
dbus
pam
2020-02-08 05:16:13 +00:00
polkit
glib-testing
(python3.withPackages (pp: with pp; [
pygobject3
]))
];
propagatedBuildInputs = [
glib
];
mesonFlags = [
"-Dinstalled_tests=true"
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
"-Dui=disabled"
2020-02-08 05:16:13 +00:00
];
postPatch = ''
substituteInPlace libmalcontent/tests/app-filter.c \
--replace "/usr/bin/true" "${coreutils}/bin/true" \
--replace "/bin/true" "${coreutils}/bin/true" \
--replace "/usr/bin/false" "${coreutils}/bin/false" \
--replace "/bin/false" "${coreutils}/bin/false"
'';
passthru = {
tests = {
installedTests = nixosTests.installed-tests.malcontent;
};
};
meta = with stdenv.lib; {
description = "Parental controls library";
homepage = "https://gitlab.freedesktop.org/pwithnall/malcontent";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.unix;
};
}