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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

141 lines
2.8 KiB
Nix
Raw Normal View History

{ stdenv
, lib
2020-02-07 22:09:48 +00:00
, fetchurl
, substituteAll
, pkg-config
2020-02-07 22:09:48 +00:00
, gtk-doc
, gobject-introspection
, gjs
, nixosTests
, curl
2020-02-07 22:09:48 +00:00
, glib
, systemd
, xz
, e2fsprogs
, libsoup
2021-04-16 21:13:20 +00:00
, glib-networking
, wrapGAppsNoGuiHook
2020-02-07 22:09:48 +00:00
, gpgme
, which
, makeWrapper
2020-02-07 22:09:48 +00:00
, autoconf
, automake
, libtool
, fuse3
2020-11-24 15:29:28 +00:00
, util-linuxMinimal
2020-02-07 22:09:48 +00:00
, libselinux
, libsodium
2020-02-07 22:09:48 +00:00
, libarchive
, libcap
, bzip2
, bison
2020-02-07 22:09:48 +00:00
, libxslt
, docbook-xsl-nons
2020-02-07 22:09:48 +00:00
, docbook_xml_dtd_42
, openssl
2020-02-07 22:09:48 +00:00
, python3
2014-11-07 05:30:04 +00:00
}:
let
testPython = python3.withPackages (p: with p; [
pyyaml
]);
in stdenv.mkDerivation rec {
2018-12-24 22:54:25 +00:00
pname = "ostree";
version = "2024.4";
2014-11-07 05:30:04 +00:00
outputs = [ "out" "dev" "man" "installedTests" ];
2018-12-24 22:54:25 +00:00
src = fetchurl {
url = "https://github.com/ostreedev/ostree/releases/download/v${version}/libostree-${version}.tar.xz";
sha256 = "sha256-Y8kZCCEzOsc3Pg2SPkwnZrJevc/fTvtEy1koxlidn8s=";
2014-11-07 05:30:04 +00:00
};
2014-11-07 05:30:04 +00:00
nativeBuildInputs = [
2020-02-07 22:09:48 +00:00
autoconf
automake
libtool
pkg-config
2020-02-07 22:09:48 +00:00
gtk-doc
gobject-introspection
which
makeWrapper
bison
2020-02-07 22:09:48 +00:00
libxslt
docbook-xsl-nons
2020-02-07 22:09:48 +00:00
docbook_xml_dtd_42
wrapGAppsNoGuiHook
2014-11-07 05:30:04 +00:00
];
buildInputs = [
curl
2020-02-07 22:09:48 +00:00
glib
systemd
e2fsprogs
libsoup
2021-04-16 21:13:20 +00:00
glib-networking
2020-02-07 22:09:48 +00:00
gpgme
fuse3
2020-02-07 22:09:48 +00:00
libselinux
libsodium
2020-02-07 22:09:48 +00:00
libcap
libarchive
bzip2
xz
2020-11-24 15:29:28 +00:00
util-linuxMinimal # for libmount
2020-02-07 22:09:48 +00:00
# for installed tests
testPython
2020-02-07 22:09:48 +00:00
gjs
];
2016-04-26 00:50:10 +00:00
2018-09-06 09:51:04 +00:00
enableParallelBuilding = true;
configureFlags = [
"--with-curl"
2018-12-24 22:54:25 +00:00
"--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
"--with-systemdsystemgeneratordir=${placeholder "out"}/lib/systemd/system-generators"
"--enable-installed-tests"
"--with-ed25519-libsodium"
];
makeFlags = [
2018-12-24 22:54:25 +00:00
"installed_testdir=${placeholder "installedTests"}/libexec/installed-tests/libostree"
"installed_test_metadir=${placeholder "installedTests"}/share/installed-tests/libostree"
2023-11-22 11:32:14 +00:00
# Setting this flag was required as workaround for a clang bug, but seems not relevant anymore.
# https://github.com/ostreedev/ostree/commit/fd8795f3874d623db7a82bec56904648fe2c1eb7
# See also Makefile-libostree.am
"INTROSPECTION_SCANNER_ENV="
];
preConfigure = ''
env NOCONFIGURE=1 ./autogen.sh
'';
2020-02-24 19:33:39 +00:00
postFixup = let
2021-01-15 09:19:50 +00:00
typelibPath = lib.makeSearchPath "/lib/girepository-1.0" [
2020-02-24 19:33:39 +00:00
(placeholder "out")
gobject-introspection
];
in ''
for test in $installedTests/libexec/installed-tests/libostree/*.js; do
2020-02-24 19:33:39 +00:00
wrapProgram "$test" --prefix GI_TYPELIB_PATH : "${typelibPath}"
done
'';
2019-11-07 13:39:54 +00:00
passthru = {
tests = {
installedTests = nixosTests.installed-tests.ostree;
};
};
meta = with lib; {
2016-04-26 00:50:10 +00:00
description = "Git for operating system binaries";
2020-02-07 22:09:48 +00:00
homepage = "https://ostree.readthedocs.io/en/latest/";
license = licenses.lgpl2Plus;
platforms = platforms.linux;
2016-04-26 00:50:10 +00:00
maintainers = with maintainers; [ copumpkin ];
};
2014-11-07 05:30:04 +00:00
}