1{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, gtk_doc, gobjectIntrospection
2, libgsystem, xz, e2fsprogs, libsoup, gpgme, which, autoconf, automake, libtool, fuse
3, libcap, yacc, libxslt, docbook_xsl, docbook_xml_dtd_42
4}:
5
6let
7 libglnx-src = fetchFromGitHub {
8 owner = "GNOME";
9 repo = "libglnx";
10 rev = "50a0feaba03ffa5a1980d3a14487276b8f49f8a6";
11 sha256 = "1rn5jdh84y1yfpqmvidx82lkm0jr7scjzdrps57r37ksxvrk3ibs";
12 };
13
14 bsdiff-src = fetchFromGitHub {
15 owner = "mendsley";
16 repo = "bsdiff";
17 rev = "7d70d8f4ff48345bc76e314c9d98da91f78873fa";
18 sha256 = "0ai2kykj8i4bqcy3gry36r3n4ax0fldncfhksl5b293nf2fihnws";
19 };
20
21 version = "2017.9";
22in stdenv.mkDerivation {
23 name = "ostree-${version}";
24
25 src = fetchFromGitHub {
26 rev = "v${version}";
27 owner = "ostreedev";
28 repo = "ostree";
29 sha256 = "1040xcw8qcs6xq8x4wg47hha3915qzb6lndb38wjyn6wzl1680q3";
30 };
31
32 nativeBuildInputs = [
33 autoconf automake libtool pkgconfig gtk_doc gobjectIntrospection which yacc
34 libxslt docbook_xsl docbook_xml_dtd_42
35 ];
36
37 buildInputs = [ libgsystem xz e2fsprogs libsoup gpgme fuse libcap ];
38
39 prePatch = ''
40 rmdir libglnx bsdiff
41 cp --no-preserve=mode -r ${libglnx-src} libglnx
42 cp --no-preserve=mode -r ${bsdiff-src} bsdiff
43 '';
44
45 preConfigure = ''
46 env NOCONFIGURE=1 ./autogen.sh
47
48 configureFlags+="--with-systemdsystemunitdir=$out/lib/systemd/system"
49 '';
50
51 meta = with stdenv.lib; {
52 description = "Git for operating system binaries";
53 homepage = "http://live.gnome.org/OSTree/";
54 license = licenses.lgpl2Plus;
55 platforms = platforms.linux;
56 maintainers = with maintainers; [ copumpkin ];
57 };
58}
59