Merge pull request #50953 from jtojnar/rpm-ostree
rpm-ostree: 2018.5 → 2019.1
This commit is contained in:
commit
de708cf331
@ -1,34 +1,17 @@
|
|||||||
{ stdenv, fetchFromGitHub, fetchpatch, pkgconfig, gtk-doc, gobject-introspection, gnome3
|
{ stdenv, fetchurl, fetchpatch, pkgconfig, gtk-doc, gobject-introspection, gnome3
|
||||||
, glib, systemd, xz, e2fsprogs, libsoup, gpgme, which, autoconf, automake, libtool, fuse, utillinuxMinimal, libselinux
|
, glib, systemd, xz, e2fsprogs, libsoup, gpgme, which, autoconf, automake, libtool, fuse, utillinuxMinimal, libselinux
|
||||||
, libarchive, libcap, bzip2, yacc, libxslt, docbook_xsl, docbook_xml_dtd_42, python3
|
, libarchive, libcap, bzip2, yacc, libxslt, docbook_xsl, docbook_xml_dtd_42, python3
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
stdenv.mkDerivation rec {
|
||||||
version = "2018.9";
|
pname = "ostree";
|
||||||
|
version = "2019.1";
|
||||||
libglnx-src = fetchFromGitHub {
|
|
||||||
owner = "GNOME";
|
|
||||||
repo = "libglnx";
|
|
||||||
rev = "470af8763ff7b99bec950a6ae0a957c1dcfc8edd";
|
|
||||||
sha256 = "1fwik38i6w3r6pn4qkizradcqp1m83n7ljh9jg0y3p3kvrbfxh15";
|
|
||||||
};
|
|
||||||
|
|
||||||
bsdiff-src = fetchFromGitHub {
|
|
||||||
owner = "mendsley";
|
|
||||||
repo = "bsdiff";
|
|
||||||
rev = "1edf9f656850c0c64dae260960fabd8249ea9c60";
|
|
||||||
sha256 = "1h71d2h2d3anp4msvpaff445rnzdxii3id2yglqk7af9i43kdsn1";
|
|
||||||
};
|
|
||||||
in stdenv.mkDerivation {
|
|
||||||
name = "ostree-${version}";
|
|
||||||
|
|
||||||
outputs = [ "out" "dev" "man" "installedTests" ];
|
outputs = [ "out" "dev" "man" "installedTests" ];
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchurl {
|
||||||
rev = "v${version}";
|
url = "https://github.com/ostreedev/ostree/releases/download/v${version}/libostree-${version}.tar.xz";
|
||||||
owner = "ostreedev";
|
sha256 = "08y7nsxl305dnlfak4kyj88lld848y4kg6bvjqngcxaqqvkk9xqm";
|
||||||
repo = "ostree";
|
|
||||||
sha256 = "0a8gr4qqxcvz3fqv9w4dxy6iq0rq4kdzf08rzv8xg4gic3ldgyvj";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
@ -57,13 +40,6 @@ in stdenv.mkDerivation {
|
|||||||
(python3.withPackages (p: with p; [ pyyaml ])) gnome3.gjs # for tests
|
(python3.withPackages (p: with p; [ pyyaml ])) gnome3.gjs # for tests
|
||||||
];
|
];
|
||||||
|
|
||||||
prePatch = ''
|
|
||||||
rmdir libglnx bsdiff
|
|
||||||
cp --no-preserve=mode -r ${libglnx-src} libglnx
|
|
||||||
cp --no-preserve=mode -r ${bsdiff-src} bsdiff
|
|
||||||
'';
|
|
||||||
|
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
env NOCONFIGURE=1 ./autogen.sh
|
env NOCONFIGURE=1 ./autogen.sh
|
||||||
'';
|
'';
|
||||||
@ -71,17 +47,16 @@ in stdenv.mkDerivation {
|
|||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-systemdsystemunitdir=$(out)/lib/systemd/system"
|
"--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
|
||||||
"--with-systemdsystemgeneratordir=$(out)/lib/systemd/system-generators"
|
"--with-systemdsystemgeneratordir=${placeholder "out"}/lib/systemd/system-generators"
|
||||||
"--enable-installed-tests"
|
"--enable-installed-tests"
|
||||||
];
|
];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"installed_testdir=$(installedTests)/libexec/installed-tests/libostree"
|
"installed_testdir=${placeholder "installedTests"}/libexec/installed-tests/libostree"
|
||||||
"installed_test_metadir=$(installedTests)/share/installed-tests/libostree"
|
"installed_test_metadir=${placeholder "installedTests"}/share/installed-tests/libostree"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Git for operating system binaries";
|
description = "Git for operating system binaries";
|
||||||
homepage = https://ostree.readthedocs.io/en/latest/;
|
homepage = https://ostree.readthedocs.io/en/latest/;
|
||||||
|
@ -1,39 +1,28 @@
|
|||||||
{ stdenv, fetchpatch, fetchFromGitHub, ostree, rpm, which, autoconf, automake, libtool, pkgconfig,
|
{ stdenv, fetchurl, ostree, rpm, which, autoconf, automake, libtool, pkgconfig, cargo, rustc,
|
||||||
gobject-introspection, gtk-doc, libxml2, libxslt, docbook_xsl, docbook_xml_dtd_42, gperf, cmake,
|
gobject-introspection, gtk-doc, libxml2, libxslt, docbook_xsl, docbook_xml_dtd_42, docbook_xml_dtd_43, gperf, cmake,
|
||||||
libcap, glib, systemd, json-glib, libarchive, libsolv, librepo, polkit,
|
libcap, glib, systemd, json-glib, libarchive, libsolv, librepo, polkit,
|
||||||
bubblewrap, pcre, check, python }:
|
bubblewrap, pcre, check, python }:
|
||||||
|
|
||||||
let
|
stdenv.mkDerivation rec {
|
||||||
libglnx-src = fetchFromGitHub {
|
pname = "rpm-ostree";
|
||||||
owner = "GNOME";
|
version = "2019.1";
|
||||||
repo = "libglnx";
|
|
||||||
rev = "97b5c08d2f93dc93ba296a84bbd2a5ab9bd8fc97";
|
src = fetchurl {
|
||||||
sha256 = "0cz4x63f6ys7dln54g6mrr7hksvqwz78wdc8qb7zr1h2cp1azcvs";
|
url = "https://github.com/projectatomic/${pname}/releases/download/v${version}/${pname}-${version}.tar.xz";
|
||||||
|
sha256 = "14qk8mq5yc67j3wl3fa9xnhh8ii8x5qdiavf7ybw7mp4ma4lwa8k";
|
||||||
};
|
};
|
||||||
|
|
||||||
libdnf-src = fetchFromGitHub {
|
patches = [
|
||||||
owner = "rpm-software-management";
|
# gobject-introspection requires curl in cflags
|
||||||
repo = "libdnf";
|
# https://github.com/NixOS/nixpkgs/pull/50953#issuecomment-449777169
|
||||||
rev = "b3fcc53f6f3baf4f51f836f5e1eb54eb82d5df49";
|
# https://github.com/NixOS/nixpkgs/pull/50953#issuecomment-452177080
|
||||||
sha256 = "15nl9x4blyc9922rvz7iq56yy8hxhpsf31cs3ag7aypqpfx3czci";
|
./fix-introspection-build.patch
|
||||||
};
|
];
|
||||||
|
|
||||||
version = "2018.5";
|
|
||||||
in stdenv.mkDerivation {
|
|
||||||
name = "rpm-ostree-${version}";
|
|
||||||
|
|
||||||
outputs = [ "out" "dev" "man" "devdoc" ];
|
outputs = [ "out" "dev" "man" "devdoc" ];
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
rev = "v${version}";
|
|
||||||
owner = "projectatomic";
|
|
||||||
repo = "rpm-ostree";
|
|
||||||
sha256 = "0y37hr8mmrsww4ka2hlqmz7wp57ibzhah4j87yg8q8dks5hxcbsx";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkgconfig which autoconf automake libtool cmake gperf
|
pkgconfig which autoconf automake libtool cmake gperf cargo rustc
|
||||||
gobject-introspection gtk-doc libxml2 libxslt docbook_xsl docbook_xml_dtd_42
|
gobject-introspection gtk-doc libxml2 libxslt docbook_xsl docbook_xml_dtd_42 docbook_xml_dtd_43
|
||||||
];
|
];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libcap ostree rpm glib systemd polkit bubblewrap
|
libcap ostree rpm glib systemd polkit bubblewrap
|
||||||
@ -41,14 +30,6 @@ in stdenv.mkDerivation {
|
|||||||
pcre check python
|
pcre check python
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = [
|
|
||||||
# Use gdbus-codegen from PATH
|
|
||||||
(fetchpatch {
|
|
||||||
url = https://github.com/projectatomic/rpm-ostree/commit/315406d8cd0937e786723986e88d376c88806c60.patch;
|
|
||||||
sha256 = "073yfa62515kyf58s0sz56w0a40062lh761y2y4assqipybwxbvp";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--enable-gtk-doc"
|
"--enable-gtk-doc"
|
||||||
"--with-bubblewrap=${bubblewrap}/bin/bwrap"
|
"--with-bubblewrap=${bubblewrap}/bin/bwrap"
|
||||||
@ -57,16 +38,9 @@ in stdenv.mkDerivation {
|
|||||||
dontUseCmakeConfigure = true;
|
dontUseCmakeConfigure = true;
|
||||||
|
|
||||||
prePatch = ''
|
prePatch = ''
|
||||||
rmdir libglnx libdnf
|
|
||||||
cp --no-preserve=mode -r ${libglnx-src} libglnx
|
|
||||||
cp --no-preserve=mode -r ${libdnf-src} libdnf
|
|
||||||
|
|
||||||
# According to #cmake on freenode, libdnf should bundle the FindLibSolv.cmake module
|
# According to #cmake on freenode, libdnf should bundle the FindLibSolv.cmake module
|
||||||
cp ${libsolv}/share/cmake/Modules/FindLibSolv.cmake libdnf/cmake/modules/
|
cp ${libsolv}/share/cmake/Modules/FindLibSolv.cmake libdnf/cmake/modules/
|
||||||
|
|
||||||
# libdnf normally wants sphinx to build its hawkey manpages, but we don't care about those manpages since we don't use hawkey
|
|
||||||
substituteInPlace configure.ac --replace 'cmake \' 'cmake -DWITH_MAN=off \'
|
|
||||||
|
|
||||||
# Let's not hardcode the rpm-gpg path...
|
# Let's not hardcode the rpm-gpg path...
|
||||||
substituteInPlace libdnf/libdnf/dnf-keyring.cpp \
|
substituteInPlace libdnf/libdnf/dnf-keyring.cpp \
|
||||||
--replace '"/etc/pki/rpm-gpg"' 'getenv("LIBDNF_RPM_GPG_PATH_OVERRIDE") ? getenv("LIBDNF_RPM_GPG_PATH_OVERRIDE") : "/etc/pki/rpm-gpg"'
|
--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 {
|
|||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
11
pkgs/tools/misc/rpm-ostree/fix-introspection-build.patch
Normal file
11
pkgs/tools/misc/rpm-ostree/fix-introspection-build.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -103,7 +103,7 @@
|
||||||
|
ostree-1 >= 2018.9
|
||||||
|
libsystemd
|
||||||
|
polkit-gobject-1
|
||||||
|
- rpm librepo libsolv
|
||||||
|
+ rpm librepo libsolv libcurl
|
||||||
|
libarchive])
|
||||||
|
|
||||||
|
dnl -ldl: https://github.com/ostreedev/ostree/commit/1f832597fc83fda6cb8daf48c4495a9e1590774c
|
Loading…
Reference in New Issue
Block a user