2016-04-29 05:20:04 +02:00
|
|
|
{ stdenv, fetchFromGitHub, ostree, rpm, which, autoconf, automake, libtool, pkgconfig,
|
2016-10-12 20:56:10 +02:00
|
|
|
libcap, glib, libgsystem, json_glib, libarchive, libsolv, librepo, gtk_doc, elfutils,
|
|
|
|
gperf, cmake, pcre, check, python, libxslt, docbook_xsl, docbook_xml_dtd_42, acl }:
|
2016-04-29 05:20:04 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
libglnx-src = fetchFromGitHub {
|
|
|
|
owner = "GNOME";
|
|
|
|
repo = "libglnx";
|
2016-10-12 20:56:10 +02:00
|
|
|
rev = "4ae5e3beaaa674abfabf7404ab6fafcc4ec547db";
|
|
|
|
sha256 = "1npb9zbyb4bl0nxqf0pcqankcwzs3k1x8i2wkdwhgak4qcvxvfqn";
|
2016-04-29 05:20:04 +02:00
|
|
|
};
|
2016-10-12 20:56:10 +02:00
|
|
|
|
|
|
|
libdnf-src = fetchFromGitHub {
|
|
|
|
owner = "rpm-software-management";
|
|
|
|
repo = "libhif";
|
|
|
|
rev = "b69552b3b3a42fd41698a925d5f5f623667bac63";
|
|
|
|
sha256 = "0h6k09rb4imzbmsn7mspwl0js2awqdpb4ysdqq550vw2nr0dzszr";
|
|
|
|
};
|
|
|
|
|
|
|
|
version = "2016.10";
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "rpm-ostree-${version}";
|
2016-04-29 05:20:04 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2016-10-12 20:56:10 +02:00
|
|
|
rev = "v${version}";
|
2016-04-29 05:20:04 +02:00
|
|
|
owner = "projectatomic";
|
|
|
|
repo = "rpm-ostree";
|
2016-10-12 20:56:10 +02:00
|
|
|
sha256 = "0a0wwklzk1kvk3bbxxfvxgk4ck5dn7a7v32shqidb674fr2d5pvb";
|
2016-04-29 05:20:04 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
2016-10-12 20:56:10 +02:00
|
|
|
which autoconf automake pkgconfig libtool libcap ostree rpm glib libgsystem gperf
|
|
|
|
json_glib libarchive libsolv librepo gtk_doc libxslt docbook_xsl docbook_xml_dtd_42
|
|
|
|
cmake pcre check python
|
2016-04-29 05:20:04 +02:00
|
|
|
# FIXME: get rid of this once libarchive properly propagates this
|
|
|
|
acl
|
|
|
|
];
|
|
|
|
|
2016-10-12 20:56:10 +02:00
|
|
|
dontUseCmakeConfigure = true;
|
|
|
|
|
2016-04-29 05:20:04 +02:00
|
|
|
prePatch = ''
|
2016-10-12 20:56:10 +02:00
|
|
|
rmdir libglnx libdnf
|
2016-04-29 05:20:04 +02:00
|
|
|
cp --no-preserve=mode -r ${libglnx-src} libglnx
|
2016-10-12 20:56:10 +02:00
|
|
|
cp --no-preserve=mode -r ${libdnf-src} libdnf
|
|
|
|
|
|
|
|
# According to #cmake on freenode, libdnf should bundle the FindLibSolv.cmake module
|
|
|
|
cp ${libsolv}/share/cmake/Modules/FindLibSolv.cmake libdnf/cmake/modules/
|
|
|
|
|
|
|
|
# See https://github.com/projectatomic/rpm-ostree/issues/480
|
|
|
|
substituteInPlace src/libpriv/rpmostree-unpacker.c --replace 'include <selinux/selinux.h>' ""
|
|
|
|
|
|
|
|
# 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...
|
|
|
|
substituteInPlace libdnf/libdnf/dnf-keyring.c \
|
|
|
|
--replace '"/etc/pki/rpm-gpg"' 'getenv("LIBDNF_RPM_GPG_PATH_OVERRIDE") ? getenv("LIBDNF_RPM_GPG_PATH_OVERRIDE") : "/etc/pki/rpm-gpg"'
|
2016-04-29 05:20:04 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
env NOCONFIGURE=1 ./autogen.sh
|
|
|
|
'';
|
2016-04-30 18:06:17 +02:00
|
|
|
|
2016-04-30 18:23:16 +02:00
|
|
|
meta = with stdenv.lib; {
|
2016-04-30 18:06:17 +02:00
|
|
|
description = "A hybrid image/package system. It uses OSTree as an image format, and uses RPM as a component model";
|
|
|
|
homepage = "https://rpm-ostree.readthedocs.io/en/latest/";
|
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ copumpkin ];
|
|
|
|
};
|
2016-04-29 05:20:04 +02:00
|
|
|
}
|
|
|
|
|