uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
104
pkgs/development/libraries/malcontent/default.nix
Normal file
104
pkgs/development/libraries/malcontent/default.nix
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitLab
|
||||
, fetchpatch
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, gobject-introspection
|
||||
, wrapGAppsHook
|
||||
, glib
|
||||
, coreutils
|
||||
, accountsservice
|
||||
, dbus
|
||||
, pam
|
||||
, polkit
|
||||
, glib-testing
|
||||
, python3
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "malcontent";
|
||||
version = "0.10.4";
|
||||
|
||||
outputs = [ "bin" "out" "lib" "pam" "dev" "man" "installedTests" ];
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.freedesktop.org";
|
||||
owner = "pwithnall";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-s2wQLb3tCfO3p8yYG8Nc6pu+y2TLfrmo7Ug1LgDLEdw=";
|
||||
};
|
||||
|
||||
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
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
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 "/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"
|
||||
'';
|
||||
|
||||
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;
|
||||
};
|
||||
};
|
||||
|
||||
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";
|
||||
homepage = "https://gitlab.freedesktop.org/pwithnall/malcontent";
|
||||
license = licenses.lgpl21Plus;
|
||||
maintainers = with maintainers; [ jtojnar ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue