2017-10-02 15:40:26 +02:00
|
|
|
{ stdenv, fetchurl, autoreconfHook, docbook_xml_dtd_412, docbook_xml_dtd_42, docbook_xml_dtd_43, docbook_xsl, which, libxml2
|
2018-12-02 12:41:15 +01:00
|
|
|
, gobject-introspection, gtk-doc, intltool, libxslt, pkgconfig, xmlto, appstream-glib, substituteAll, glibcLocales, yacc, xdg-dbus-proxy, p11-kit
|
2018-11-16 18:00:58 +01:00
|
|
|
, bubblewrap, bzip2, dbus, glib, gpgme, json-glib, libarchive, libcap, libseccomp, coreutils, gettext, python2, hicolor-icon-theme
|
2019-04-17 02:38:26 +02:00
|
|
|
, libsoup, lzma, ostree, polkit, python3, systemd, xorg, valgrind, glib-networking, wrapGAppsHook, gnome3, gsettings-desktop-schemas }:
|
2017-10-02 15:40:26 +02:00
|
|
|
|
2018-11-16 18:00:58 +01:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "flatpak";
|
2019-04-08 12:39:13 +02:00
|
|
|
version = "1.2.4";
|
2017-10-02 15:40:26 +02:00
|
|
|
|
2018-09-06 11:38:09 +02:00
|
|
|
# TODO: split out lib once we figure out what to do with triggerdir
|
2017-10-02 15:40:26 +02:00
|
|
|
outputs = [ "out" "man" "doc" "installedTests" ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
2018-11-16 18:00:58 +01:00
|
|
|
url = "https://github.com/flatpak/flatpak/releases/download/${version}/${pname}-${version}.tar.xz";
|
2019-04-08 12:39:13 +02:00
|
|
|
sha256 = "1qf3ys84fzv11z6f6li59rxjdjbyrv7cyi9539k73r9i9pckjr8v";
|
2017-10-02 15:40:26 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-test-paths.patch;
|
2018-11-16 18:00:58 +01:00
|
|
|
inherit coreutils gettext glibcLocales;
|
2017-10-02 15:40:26 +02:00
|
|
|
hicolorIconTheme = hicolor-icon-theme;
|
|
|
|
})
|
2018-09-06 11:38:09 +02:00
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
p11 = p11-kit;
|
|
|
|
})
|
2019-03-19 05:57:43 +01:00
|
|
|
(substituteAll {
|
|
|
|
src = ./bubblewrap-paths.patch;
|
|
|
|
inherit (builtins) storeDir;
|
|
|
|
})
|
2017-10-02 15:40:26 +02:00
|
|
|
# patch taken from gtk_doc
|
|
|
|
./respect-xml-catalog-files-var.patch
|
2018-07-19 10:52:59 +02:00
|
|
|
./use-flatpak-from-path.patch
|
2019-04-16 04:47:23 +02:00
|
|
|
./unset-env-vars.patch
|
2017-10-02 15:40:26 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2018-12-02 12:41:15 +01:00
|
|
|
autoreconfHook libxml2 docbook_xml_dtd_412 docbook_xml_dtd_42 docbook_xml_dtd_43 docbook_xsl which gobject-introspection
|
2018-11-16 18:00:58 +01:00
|
|
|
gtk-doc intltool libxslt pkgconfig xmlto appstream-glib yacc wrapGAppsHook
|
2018-09-06 11:38:09 +02:00
|
|
|
];
|
2017-10-02 15:40:26 +02:00
|
|
|
|
|
|
|
buildInputs = [
|
2019-01-15 20:15:29 +01:00
|
|
|
bubblewrap bzip2 dbus gnome3.dconf glib gpgme json-glib libarchive libcap libseccomp
|
2018-07-17 22:11:16 +02:00
|
|
|
libsoup lzma ostree polkit python3 systemd xorg.libXau
|
2019-04-17 02:38:26 +02:00
|
|
|
gsettings-desktop-schemas glib-networking
|
2017-10-02 15:40:26 +02:00
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [ valgrind ];
|
|
|
|
|
|
|
|
doCheck = false; # TODO: some issues with temporary files
|
|
|
|
|
2019-01-04 20:33:50 +01:00
|
|
|
NIX_LDFLAGS = [
|
|
|
|
"-lpthread"
|
|
|
|
];
|
|
|
|
|
2017-10-02 15:40:26 +02:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--with-system-bubblewrap=${bubblewrap}/bin/bwrap"
|
2018-09-06 11:38:09 +02:00
|
|
|
"--with-system-dbus-proxy=${xdg-dbus-proxy}/bin/xdg-dbus-proxy"
|
2017-10-02 15:40:26 +02: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
|
|
|
|
'';
|
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|