nixpkgs/pkgs/development/libraries/flatpak/default.nix

91 lines
2.9 KiB
Nix
Raw Normal View History

2017-10-02 14:40:26 +01:00
{ stdenv, fetchurl, autoreconfHook, docbook_xml_dtd_412, docbook_xml_dtd_42, docbook_xml_dtd_43, docbook_xsl, which, libxml2
, gobject-introspection, gtk-doc, intltool, libxslt, pkgconfig, xmlto, appstream-glib, substituteAll, glibcLocales, yacc, xdg-dbus-proxy, p11-kit
2019-11-07 13:38:31 +00:00
, bubblewrap, bzip2, dbus, glib, gpgme, json-glib, libarchive, libcap, libseccomp, coreutils, gettext, hicolor-icon-theme, fuse, nixosTests
2019-11-30 23:11:47 +00:00
, libsoup, lzma, ostree, polkit, python3, systemd, xorg, valgrind, glib-networking, wrapGAppsHook, dconf, gsettings-desktop-schemas, librsvg }:
2017-10-02 14:40:26 +01:00
2018-11-16 17:00:58 +00:00
stdenv.mkDerivation rec {
pname = "flatpak";
version = "1.4.2";
2017-10-02 14:40:26 +01:00
2018-09-06 10:38:09 +01:00
# TODO: split out lib once we figure out what to do with triggerdir
2017-10-02 14:40:26 +01:00
outputs = [ "out" "man" "doc" "installedTests" ];
src = fetchurl {
2018-11-16 17:00:58 +00:00
url = "https://github.com/flatpak/flatpak/releases/download/${version}/${pname}-${version}.tar.xz";
sha256 = "08nmpp26mgv0vp3mlwk97rnp0j7i108h4hr9nllja19sjxnrlygj";
2017-10-02 14:40:26 +01:00
};
patches = [
(substituteAll {
src = ./fix-test-paths.patch;
2018-11-16 17:00:58 +00:00
inherit coreutils gettext glibcLocales;
2017-10-02 14:40:26 +01:00
hicolorIconTheme = hicolor-icon-theme;
})
2018-09-06 10:38:09 +01:00
(substituteAll {
src = ./fix-paths.patch;
p11 = p11-kit;
})
(substituteAll {
src = ./bubblewrap-paths.patch;
inherit (builtins) storeDir;
})
2017-10-02 14:40:26 +01:00
# patch taken from gtk_doc
./respect-xml-catalog-files-var.patch
./use-flatpak-from-path.patch
./unset-env-vars.patch
./validate-icon-pixbuf.patch
2017-10-02 14:40:26 +01:00
];
nativeBuildInputs = [
autoreconfHook libxml2 docbook_xml_dtd_412 docbook_xml_dtd_42 docbook_xml_dtd_43 docbook_xsl which gobject-introspection
2018-11-16 17:00:58 +00:00
gtk-doc intltool libxslt pkgconfig xmlto appstream-glib yacc wrapGAppsHook
2018-09-06 10:38:09 +01:00
];
2017-10-02 14:40:26 +01:00
buildInputs = [
2019-11-30 23:11:47 +00:00
bubblewrap bzip2 dbus dconf glib gpgme json-glib libarchive libcap libseccomp
libsoup lzma ostree polkit python3 systemd xorg.libXau fuse
gsettings-desktop-schemas glib-networking
librsvg # for flatpak-validate-icon
2017-10-02 14:40:26 +01:00
];
checkInputs = [ valgrind ];
doCheck = false; # TODO: some issues with temporary files
2019-10-30 01:29:30 +00:00
NIX_LDFLAGS = "-lpthread";
2019-01-04 19:33:50 +00:00
2017-10-02 14:40:26 +01:00
enableParallelBuilding = true;
configureFlags = [
"--with-system-bubblewrap=${bubblewrap}/bin/bwrap"
2018-09-06 10:38:09 +01:00
"--with-system-dbus-proxy=${xdg-dbus-proxy}/bin/xdg-dbus-proxy"
"--with-dbus-config-dir=${placeholder "out"}/share/dbus-1/system.d"
2017-10-02 14:40:26 +01:00
"--localstatedir=/var"
"--enable-installed-tests"
];
makeFlags = [
"installed_testdir=$(installedTests)/libexec/installed-tests/flatpak"
"installed_test_metadir=$(installedTests)/share/installed-tests/flatpak"
];
postPatch = ''
patchShebangs buildutil
patchShebangs tests
'';
2019-11-07 13:38:31 +00:00
passthru = {
tests = {
installedTests = nixosTests.installed-tests.flatpak;
};
};
2017-10-02 14:40:26 +01:00
meta = with stdenv.lib; {
description = "Linux application sandboxing and distribution framework";
homepage = https://flatpak.org/;
license = licenses.lgpl21;
maintainers = with maintainers; [ jtojnar ];
platforms = platforms.linux;
};
}