forked from mirrors/nixpkgs
flatpak-builder: init add 0.10.10
This commit is contained in:
parent
2fc8b83282
commit
843bc0f73a
103
pkgs/development/tools/flatpak-builder/default.nix
Normal file
103
pkgs/development/tools/flatpak-builder/default.nix
Normal file
|
@ -0,0 +1,103 @@
|
|||
{ stdenv
|
||||
, fetchurl
|
||||
, substituteAll
|
||||
|
||||
, autoreconfHook
|
||||
, docbook_xml_dtd_412
|
||||
, docbook_xml_dtd_42
|
||||
, docbook_xml_dtd_43
|
||||
, docbook_xsl
|
||||
, gettext
|
||||
, libxml2
|
||||
, libxslt
|
||||
, pkgconfig
|
||||
, xmlto
|
||||
|
||||
, acl
|
||||
, bazaar
|
||||
, binutils
|
||||
, bzip2
|
||||
, coreutils
|
||||
, cpio
|
||||
, elfutils
|
||||
, flatpak
|
||||
, gitMinimal
|
||||
, glib
|
||||
, gnutar
|
||||
, json_glib
|
||||
, libcap
|
||||
, libdwarf
|
||||
, libsoup
|
||||
, ostree
|
||||
, patch
|
||||
, rpm
|
||||
, unzip
|
||||
}:
|
||||
|
||||
let
|
||||
version = "0.10.10";
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "flatpak-builder-${version}";
|
||||
|
||||
outputs = [ "out" "doc" "man" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/flatpak/flatpak-builder/releases/download/${version}/${name}.tar.xz";
|
||||
sha256 = "0b0c2rmf2vj596600blbhsiv2dg7qwpr33lgdcn0bnqc4ddri6f2";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
docbook_xml_dtd_412
|
||||
docbook_xml_dtd_42
|
||||
docbook_xml_dtd_43
|
||||
docbook_xsl
|
||||
gettext
|
||||
libxml2
|
||||
libxslt
|
||||
pkgconfig
|
||||
xmlto
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
acl
|
||||
bzip2
|
||||
elfutils
|
||||
flatpak
|
||||
glib
|
||||
json_glib
|
||||
libcap
|
||||
libdwarf
|
||||
libsoup
|
||||
libxml2
|
||||
ostree
|
||||
];
|
||||
|
||||
patches = [
|
||||
# patch taken from gtk_doc
|
||||
./respect-xml-catalog-files-var.patch
|
||||
(substituteAll {
|
||||
src = ./fix-paths.patch;
|
||||
bzr = "${bazaar}/bin/bzr";
|
||||
cp = "${coreutils}/bin/cp";
|
||||
patch = "${patch}/bin/patch";
|
||||
tar = "${gnutar}/bin/tar";
|
||||
unzip = "${unzip}/bin/unzip";
|
||||
rpm2cpio = "${rpm}/bin/rpm2cpio";
|
||||
cpio = "${cpio}/bin/cpio";
|
||||
git = "${gitMinimal}/bin/git";
|
||||
rofilesfuse = "${ostree}/bin/rofiles-fuse";
|
||||
strip = "${binutils}/bin/strip";
|
||||
eustrip = "${elfutils}/bin/eu-strip";
|
||||
euelfcompress = "${elfutils}/bin/eu-elfcompress";
|
||||
})
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Tool to build flatpaks from source";
|
||||
homepage = https://flatpak.org/;
|
||||
license = licenses.lgpl21;
|
||||
maintainers = with maintainers; [ jtojnar ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
116
pkgs/development/tools/flatpak-builder/fix-paths.patch
Normal file
116
pkgs/development/tools/flatpak-builder/fix-paths.patch
Normal file
|
@ -0,0 +1,116 @@
|
|||
--- a/src/builder-context.c
|
||||
+++ b/src/builder-context.c
|
||||
@@ -711,7 +711,7 @@
|
||||
g_autoptr(GFile) rofiles_base = NULL;
|
||||
g_autoptr(GFile) rofiles_dir = NULL;
|
||||
g_autofree char *tmpdir_name = NULL;
|
||||
- char *argv[] = { "rofiles-fuse",
|
||||
+ char *argv[] = { "@rofilesfuse@",
|
||||
"-o",
|
||||
"kernel_cache,entry_timeout=60,attr_timeout=60,splice_write,splice_move",
|
||||
(char *)flatpak_file_get_path_cached (self->app_dir),
|
||||
--- a/src/builder-git.c
|
||||
+++ b/src/builder-git.c
|
||||
@@ -44,7 +44,7 @@
|
||||
va_list ap;
|
||||
|
||||
va_start (ap, error);
|
||||
- res = flatpak_spawn (dir, output, flags, error, "git", ap);
|
||||
+ res = flatpak_spawn (dir, output, flags, error, "@git@", ap);
|
||||
va_end (ap);
|
||||
|
||||
return res;
|
||||
@@ -58,7 +58,7 @@
|
||||
va_list ap;
|
||||
|
||||
va_start (ap, error);
|
||||
- res = flatpak_spawn (NULL, NULL, 0, error, "cp", ap);
|
||||
+ res = flatpak_spawn (NULL, NULL, 0, error, "@cp@", ap);
|
||||
va_end (ap);
|
||||
|
||||
return res;
|
||||
--- a/src/builder-source-archive.c
|
||||
+++ b/src/builder-source-archive.c
|
||||
@@ -401,7 +401,7 @@
|
||||
va_list ap;
|
||||
|
||||
va_start (ap, error);
|
||||
- res = flatpak_spawn (dir, NULL, 0, error, "tar", ap);
|
||||
+ res = flatpak_spawn (dir, NULL, 0, error, "@tar@", ap);
|
||||
va_end (ap);
|
||||
|
||||
return res;
|
||||
@@ -416,7 +416,7 @@
|
||||
va_list ap;
|
||||
|
||||
va_start (ap, error);
|
||||
- res = flatpak_spawn (dir, NULL, 0, error, "unzip", ap);
|
||||
+ res = flatpak_spawn (dir, NULL, 0, error, "@unzip@", ap);
|
||||
va_end (ap);
|
||||
|
||||
return res;
|
||||
@@ -428,7 +428,7 @@
|
||||
GError **error)
|
||||
{
|
||||
gboolean res;
|
||||
- const gchar *argv[] = { "sh", "-c", "rpm2cpio \"$1\" | cpio -i -d",
|
||||
+ const gchar *argv[] = { "sh", "-c", "@rpm2cpio@ \"$1\" | @cpio@ -i -d",
|
||||
"sh", /* shell's $0 */
|
||||
rpm_path, /* shell's $1 */
|
||||
NULL };
|
||||
--- a/src/builder-source-bzr.c
|
||||
+++ b/src/builder-source-bzr.c
|
||||
@@ -124,7 +124,7 @@
|
||||
va_list ap;
|
||||
|
||||
va_start (ap, error);
|
||||
- res = flatpak_spawn (dir, output, 0, error, "bzr", ap);
|
||||
+ res = flatpak_spawn (dir, output, 0, error, "@bzr@", ap);
|
||||
va_end (ap);
|
||||
|
||||
return res;
|
||||
--- a/src/builder-source-patch.c
|
||||
+++ b/src/builder-source-patch.c
|
||||
@@ -204,11 +204,11 @@
|
||||
|
||||
args = g_ptr_array_new ();
|
||||
if (use_git) {
|
||||
- g_ptr_array_add (args, "git");
|
||||
+ g_ptr_array_add (args, "@git@");
|
||||
g_ptr_array_add (args, "apply");
|
||||
g_ptr_array_add (args, "-v");
|
||||
} else {
|
||||
- g_ptr_array_add (args, "patch");
|
||||
+ g_ptr_array_add (args, "@patch@");
|
||||
}
|
||||
for (i = 0; extra_options != NULL && extra_options[i] != NULL; i++)
|
||||
g_ptr_array_add (args, (gchar *) extra_options[i]);
|
||||
--- a/src/builder-utils.c
|
||||
+++ b/src/builder-utils.c
|
||||
@@ -139,7 +139,7 @@
|
||||
va_list ap;
|
||||
|
||||
va_start (ap, error);
|
||||
- res = flatpak_spawn (NULL, NULL, 0, error, "strip", ap);
|
||||
+ res = flatpak_spawn (NULL, NULL, 0, error, "@strip@", ap);
|
||||
va_end (ap);
|
||||
|
||||
return res;
|
||||
@@ -153,7 +153,7 @@
|
||||
va_list ap;
|
||||
|
||||
va_start (ap, error);
|
||||
- res = flatpak_spawn (NULL, NULL, 0, error, "eu-strip", ap);
|
||||
+ res = flatpak_spawn (NULL, NULL, 0, error, "@eustrip@", ap);
|
||||
va_end (ap);
|
||||
|
||||
return res;
|
||||
@@ -167,7 +167,7 @@
|
||||
va_list ap;
|
||||
|
||||
va_start (ap, error);
|
||||
- res = flatpak_spawn (NULL, NULL, 0, error, "eu-elfcompress", ap);
|
||||
+ res = flatpak_spawn (NULL, NULL, 0, error, "@euelfcompress@", ap);
|
||||
va_end (ap);
|
||||
|
||||
return res;
|
|
@ -0,0 +1,13 @@
|
|||
--- a/acinclude.m4
|
||||
+++ b/acinclude.m4
|
||||
@@ -40,8 +40,8 @@
|
||||
[
|
||||
AC_REQUIRE([JH_PATH_XML_CATALOG],[JH_PATH_XML_CATALOG(,[:])])dnl
|
||||
AC_MSG_CHECKING([for ifelse([$2],,[$1],[$2]) in XML catalog])
|
||||
- if $jh_found_xmlcatalog && \
|
||||
- AC_RUN_LOG([$XMLCATALOG --noout "$XML_CATALOG_FILE" "$1" >&2]); then
|
||||
+ # empty argument forces libxml to use XML_CATALOG_FILES variable
|
||||
+ if AC_RUN_LOG([$XMLCATALOG --noout "" "$1" >&2]); then
|
||||
AC_MSG_RESULT([found])
|
||||
ifelse([$3],,,[$3
|
||||
])dnl
|
|
@ -2299,6 +2299,8 @@ with pkgs;
|
|||
|
||||
flatpak = callPackage ../development/libraries/flatpak { };
|
||||
|
||||
flatpak-builder = callPackage ../development/tools/flatpak-builder { };
|
||||
|
||||
figlet = callPackage ../tools/misc/figlet { };
|
||||
|
||||
file = callPackage ../tools/misc/file { };
|
||||
|
|
Loading…
Reference in a new issue