summary refs log tree commit diff
path: root/pkgs/development/tools/flatpak-builder/default.nix
blob: 351ec2c77dbaf8aa8b417a63d581afc212ac53b1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
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;
  };
}