git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #50953 from jtojnar/rpm-ostree

rpm-ostree: 2018.5 → 2019.1

commitde708cf331ad349987cf49795173c60b9ea0606a authorJan Tojnar <jtojnar@gmail.com> dateFri 1 Feb 2019, 19:36 (8 years ago) parent212e78fc0ffbe8
3 files changed+38−79
pkgs/tools/misc/ostree/default.nix+11−36 pkgs/tools/misc/rpm-ostree/default.nix+16−43 pkgs/tools/misc/rpm-ostree/fix-introspection-build.patch+11
pkgs/tools/misc/ostree/default.nix+11−36
@@ -1,34 +1,17 @@
1−{ stdenv, fetchFromGitHub, fetchpatch, pkgconfig, gtk-doc, gobject-introspection, gnome3
1+{ stdenv, fetchurl, fetchpatch, pkgconfig, gtk-doc, gobject-introspection, gnome3
22, glib, systemd, xz, e2fsprogs, libsoup, gpgme, which, autoconf, automake, libtool, fuse, utillinuxMinimal, libselinux
33, libarchive, libcap, bzip2, yacc, libxslt, docbook_xsl, docbook_xml_dtd_42, python3
44}:
55
6−let
7− version = "2018.9";
8−
9− libglnx-src = fetchFromGitHub {
10− owner = "GNOME";
11− repo = "libglnx";
12− rev = "470af8763ff7b99bec950a6ae0a957c1dcfc8edd";
13− sha256 = "1fwik38i6w3r6pn4qkizradcqp1m83n7ljh9jg0y3p3kvrbfxh15";
14− };
15−
16− bsdiff-src = fetchFromGitHub {
17− owner = "mendsley";
18− repo = "bsdiff";
19− rev = "1edf9f656850c0c64dae260960fabd8249ea9c60";
20− sha256 = "1h71d2h2d3anp4msvpaff445rnzdxii3id2yglqk7af9i43kdsn1";
21− };
22−in stdenv.mkDerivation {
23− name = "ostree-${version}";
6+stdenv.mkDerivation rec {
7+ pname = "ostree";
8+ version = "2019.1";
249
2510 outputs = [ "out" "dev" "man" "installedTests" ];
2611
27− src = fetchFromGitHub {
28− rev = "v${version}";
29− owner = "ostreedev";
30− repo = "ostree";
31− sha256 = "0a8gr4qqxcvz3fqv9w4dxy6iq0rq4kdzf08rzv8xg4gic3ldgyvj";
12+ src = fetchurl {
13+ url = "https://github.com/ostreedev/ostree/releases/download/v${version}/libostree-${version}.tar.xz";
14+ sha256 = "08y7nsxl305dnlfak4kyj88lld848y4kg6bvjqngcxaqqvkk9xqm";
3215 };
3316
3417 patches = [
@@ -57,13 +40,6 @@ in stdenv.mkDerivation {
5740 (python3.withPackages (p: with p; [ pyyaml ])) gnome3.gjs # for tests
5841 ];
5942
60− prePatch = ''
61− rmdir libglnx bsdiff
62− cp --no-preserve=mode -r ${libglnx-src} libglnx
63− cp --no-preserve=mode -r ${bsdiff-src} bsdiff
64− '';
65−
66−
6743 preConfigure = ''
6844 env NOCONFIGURE=1 ./autogen.sh
6945 '';
@@ -71,17 +47,16 @@ in stdenv.mkDerivation {
7147 enableParallelBuilding = true;
7248
7349 configureFlags = [
74− "--with-systemdsystemunitdir=$(out)/lib/systemd/system"
75− "--with-systemdsystemgeneratordir=$(out)/lib/systemd/system-generators"
50+ "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
51+ "--with-systemdsystemgeneratordir=${placeholder "out"}/lib/systemd/system-generators"
7652 "--enable-installed-tests"
7753 ];
7854
7955 makeFlags = [
80− "installed_testdir=$(installedTests)/libexec/installed-tests/libostree"
81− "installed_test_metadir=$(installedTests)/share/installed-tests/libostree"
56+ "installed_testdir=${placeholder "installedTests"}/libexec/installed-tests/libostree"
57+ "installed_test_metadir=${placeholder "installedTests"}/share/installed-tests/libostree"
8258 ];
8359
84−
8560 meta = with stdenv.lib; {
8661 description = "Git for operating system binaries";
8762 homepage = https://ostree.readthedocs.io/en/latest/;
pkgs/tools/misc/rpm-ostree/default.nix+16−43
@@ -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−
pkgs/tools/misc/rpm-ostree/fix-introspection-build.patchnew file+11
@@ -0,0 +1,11 @@
1+--- a/configure.ac
2++++ b/configure.ac
3+@@ -103,7 +103,7 @@
4+ ostree-1 >= 2018.9
5+ libsystemd
6+ polkit-gobject-1
7+- rpm librepo libsolv
8++ rpm librepo libsolv libcurl
9+ libarchive])
10+
11+ dnl -ldl: https://github.com/ostreedev/ostree/commit/1f832597fc83fda6cb8daf48c4495a9e1590774c