diff options
author | worldofpeace <worldofpeace@protonmail.ch> | 2020-02-10 12:57:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-10 12:57:19 -0500 |
commit | 09f7e376c224993e82828766bf524f0b34ad312e (patch) | |
tree | 61784455f0f29158fc189e8595d3ab37e83391d8 /pkgs/development/libraries/malcontent/default.nix | |
parent | eaeb87add1ec31b3b088b65aa601b3c4f6d78e51 (diff) | |
parent | e3cbebfc7c656c50e4506bcc5d21d909fad8c22f (diff) | |
download | nixlib-09f7e376c224993e82828766bf524f0b34ad312e.tar nixlib-09f7e376c224993e82828766bf524f0b34ad312e.tar.gz nixlib-09f7e376c224993e82828766bf524f0b34ad312e.tar.bz2 nixlib-09f7e376c224993e82828766bf524f0b34ad312e.tar.lz nixlib-09f7e376c224993e82828766bf524f0b34ad312e.tar.xz nixlib-09f7e376c224993e82828766bf524f0b34ad312e.tar.zst nixlib-09f7e376c224993e82828766bf524f0b34ad312e.zip |
Merge pull request #79416 from jtojnar/flatpak-1.6
flatpak: 1.4.2 → 1.6.1
Diffstat (limited to 'pkgs/development/libraries/malcontent/default.nix')
-rw-r--r-- | pkgs/development/libraries/malcontent/default.nix | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/pkgs/development/libraries/malcontent/default.nix b/pkgs/development/libraries/malcontent/default.nix new file mode 100644 index 000000000000..3a40be3c4edb --- /dev/null +++ b/pkgs/development/libraries/malcontent/default.nix @@ -0,0 +1,87 @@ +{ stdenv +, fetchFromGitLab +, meson +, ninja +, pkgconfig +, gobject-introspection +, wrapGAppsHook +, glib +, coreutils +, dbus +, polkit +, glib-testing +, python3 +, nixosTests +}: + +stdenv.mkDerivation rec { + pname = "malcontent"; + version = "0.4.0"; + + outputs = [ "bin" "out" "dev" "man" "installedTests" ]; + + src = fetchFromGitLab { + domain = "gitlab.freedesktop.org"; + owner = "pwithnall"; + repo = pname; + rev = version; + sha256 = "0d703r20djvrgy711jvn90i8dwbb0p7qj4j43z101afpkiizq810"; + }; + + patches = [ + # Allow installing installed tests to a separate output. + ./installed-tests-path.patch + + # This is unnecessary and breaks when submodules are not available. + # https://gitlab.freedesktop.org/pwithnall/malcontent/merge_requests/3 + ./use-system-dependencies.patch + ]; + + nativeBuildInputs = [ + meson + ninja + pkgconfig + gobject-introspection + wrapGAppsHook + ]; + + buildInputs = [ + dbus + polkit + glib-testing + (python3.withPackages (pp: with pp; [ + pygobject3 + ])) + ]; + + propagatedBuildInputs = [ + glib + ]; + + mesonFlags = [ + "-Dinstalled_tests=true" + "-Dinstalled_test_prefix=${placeholder "installedTests"}" + ]; + + 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; + }; +} |