nixpkgs/pkgs/tools/misc/rpm-ostree/default.nix

73 lines
2.6 KiB
Nix
Raw Normal View History

2016-04-29 05:20:04 +02:00
{ stdenv, fetchFromGitHub, ostree, rpm, which, autoconf, automake, libtool, pkgconfig,
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";
rev = "4ae5e3beaaa674abfabf7404ab6fafcc4ec547db";
sha256 = "1npb9zbyb4bl0nxqf0pcqankcwzs3k1x8i2wkdwhgak4qcvxvfqn";
2016-04-29 05:20:04 +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 {
rev = "v${version}";
2016-04-29 05:20:04 +02:00
owner = "projectatomic";
repo = "rpm-ostree";
sha256 = "0a0wwklzk1kvk3bbxxfvxgk4ck5dn7a7v32shqidb674fr2d5pvb";
2016-04-29 05:20:04 +02:00
};
buildInputs = [
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
];
dontUseCmakeConfigure = true;
2016-04-29 05:20:04 +02:00
prePatch = ''
rmdir libglnx libdnf
2016-04-29 05:20:04 +02:00
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
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
'';
meta = with stdenv.lib; {
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
}