@@ -1,39 +1,28 @@
1−{ stdenv, fetchpatch, fetchFromGitHub, ostree, rpm, which, autoconf, automake, libtool, pkgconfig,
2− gobject-introspection, gtk-doc, libxml2, libxslt, docbook_xsl, docbook_xml_dtd_42, gperf, cmake,
1+{ stdenv, fetchurl, ostree, rpm, which, autoconf, automake, libtool, pkgconfig, cargo, rustc,
2+ gobject-introspection, gtk-doc, libxml2, libxslt, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_43, gperf, cmake,
33 libcap, glib, systemd, json-glib, libarchive, libsolv, librepo, polkit,
44 bubblewrap, pcre, check, python }:
55
6−let
7− libglnx-src = fetchFromGitHub {
8− owner = "GNOME";
9− repo = "libglnx";
10− rev = "97b5c08d2f93dc93ba296a84bbd2a5ab9bd8fc97";
11− sha256 = "0cz4x63f6ys7dln54g6mrr7hksvqwz78wdc8qb7zr1h2cp1azcvs";
12− };
6+stdenv.mkDerivation rec {
7+ pname = "rpm-ostree";
8+ version = "2019.1";
139
14− libdnf-src = fetchFromGitHub {
15− owner = "rpm-software-management";
16− repo = "libdnf";
17− rev = "b3fcc53f6f3baf4f51f836f5e1eb54eb82d5df49";
18− sha256 = "15nl9x4blyc9922rvz7iq56yy8hxhpsf31cs3ag7aypqpfx3czci";
10+ src = fetchurl {
11+ url = "https://github.com/projectatomic/${pname}/releases/download/v${version}/${pname}-${version}.tar.xz";
12+ sha256 = "14qk8mq5yc67j3wl3fa9xnhh8ii8x5qdiavf7ybw7mp4ma4lwa8k";
1913 };
2014
21− version = "2018.5";
22−in stdenv.mkDerivation {
23− name = "rpm-ostree-${version}";
15+ patches = [
16+ # gobject-introspection requires curl in cflags
17+ # https://github.com/NixOS/nixpkgs/pull/50953#issuecomment-449777169
18+ # https://github.com/NixOS/nixpkgs/pull/50953#issuecomment-452177080
19+ ./fix-introspection-build.patch
20+ ];
2421
2522 outputs = [ "out" "dev" "man" "devdoc" ];
26−
27− src = fetchFromGitHub {
28− rev = "v${version}";
29− owner = "projectatomic";
30− repo = "rpm-ostree";
31− sha256 = "0y37hr8mmrsww4ka2hlqmz7wp57ibzhah4j87yg8q8dks5hxcbsx";
32− };
33−
3423 nativeBuildInputs = [
35− pkgconfig which autoconf automake libtool cmake gperf
36− gobject-introspection gtk-doc libxml2 libxslt docbook_xsl docbook_xml_dtd_42
24+ pkgconfig which autoconf automake libtool cmake gperf cargo rustc
25+ gobject-introspection gtk-doc libxml2 libxslt docbook_xsl docbook_xml_dtd_42 docbook_xml_dtd_43
3726 ];
3827 buildInputs = [
3928 libcap ostree rpm glib systemd polkit bubblewrap
@@ -41,14 +30,6 @@ in stdenv.mkDerivation {
4130 pcre check python
4231 ];
4332
44− patches = [
45− # Use gdbus-codegen from PATH
46− (fetchpatch {
47− url = https://github.com/projectatomic/rpm-ostree/commit/315406d8cd0937e786723986e88d376c88806c60.patch;
48− sha256 = "073yfa62515kyf58s0sz56w0a40062lh761y2y4assqipybwxbvp";
49− })
50− ];
51−
5233 configureFlags = [
5334 "--enable-gtk-doc"
5435 "--with-bubblewrap=${bubblewrap}/bin/bwrap"
@@ -57,16 +38,9 @@ in stdenv.mkDerivation {
5738 dontUseCmakeConfigure = true;
5839
5940 prePatch = ''
60− rmdir libglnx libdnf
61− cp --no-preserve=mode -r ${libglnx-src} libglnx
62− cp --no-preserve=mode -r ${libdnf-src} libdnf
63−
6441 # According to #cmake on freenode, libdnf should bundle the FindLibSolv.cmake module
6542 cp ${libsolv}/share/cmake/Modules/FindLibSolv.cmake libdnf/cmake/modules/
6643
67− # libdnf normally wants sphinx to build its hawkey manpages, but we don't care about those manpages since we don't use hawkey
68− substituteInPlace configure.ac --replace 'cmake \' 'cmake -DWITH_MAN=off \'
69−
7044 # Let's not hardcode the rpm-gpg path...
7145 substituteInPlace libdnf/libdnf/dnf-keyring.cpp \
7246 --replace '"/etc/pki/rpm-gpg"' 'getenv("LIBDNF_RPM_GPG_PATH_OVERRIDE") ? getenv("LIBDNF_RPM_GPG_PATH_OVERRIDE") : "/etc/pki/rpm-gpg"'
@@ -84,4 +58,3 @@ in stdenv.mkDerivation {
8458 platforms = platforms.linux;
8559 };
8660}
87−