2022-08-12 12:06:08 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchurl
|
2024-05-15 15:35:15 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, substituteAll
|
2020-08-20 17:08:02 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, gtk-doc
|
|
|
|
, gobject-introspection
|
|
|
|
, gjs
|
|
|
|
, nixosTests
|
2024-05-15 15:35:15 +00:00
|
|
|
, pkgsCross
|
2022-10-21 18:38:19 +00:00
|
|
|
, curl
|
2020-04-24 23:36:52 +00:00
|
|
|
, glib
|
|
|
|
, systemd
|
|
|
|
, xz
|
|
|
|
, e2fsprogs
|
|
|
|
, libsoup
|
2021-04-18 02:13:31 +00:00
|
|
|
, glib-networking
|
2022-10-21 18:38:19 +00:00
|
|
|
, wrapGAppsNoGuiHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, gpgme
|
|
|
|
, which
|
|
|
|
, makeWrapper
|
|
|
|
, autoconf
|
|
|
|
, automake
|
|
|
|
, libtool
|
2022-03-05 16:20:37 +00:00
|
|
|
, fuse3
|
2020-11-24 20:58:05 +00:00
|
|
|
, util-linuxMinimal
|
2020-04-24 23:36:52 +00:00
|
|
|
, libselinux
|
2020-08-20 17:08:02 +00:00
|
|
|
, libsodium
|
2020-04-24 23:36:52 +00:00
|
|
|
, libarchive
|
|
|
|
, libcap
|
|
|
|
, bzip2
|
2021-04-05 15:23:46 +00:00
|
|
|
, bison
|
2020-04-24 23:36:52 +00:00
|
|
|
, libxslt
|
2020-08-20 17:08:02 +00:00
|
|
|
, docbook-xsl-nons
|
2020-04-24 23:36:52 +00:00
|
|
|
, docbook_xml_dtd_42
|
2020-08-20 17:08:02 +00:00
|
|
|
, openssl
|
2020-04-24 23:36:52 +00:00
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2023-07-15 17:15:38 +00:00
|
|
|
testPython = python3.withPackages (p: with p; [
|
2020-04-24 23:36:52 +00:00
|
|
|
pyyaml
|
2023-07-15 17:15:38 +00:00
|
|
|
]);
|
2020-04-24 23:36:52 +00:00
|
|
|
in stdenv.mkDerivation rec {
|
|
|
|
pname = "ostree";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2024.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
outputs = [ "out" "dev" "man" "installedTests" ];
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/ostreedev/ostree/releases/download/v${version}/libostree-${version}.tar.xz";
|
2024-04-21 15:54:59 +00:00
|
|
|
sha256 = "sha256-Y8kZCCEzOsc3Pg2SPkwnZrJevc/fTvtEy1koxlidn8s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
patches = lib.optionals stdenv.hostPlatform.isMusl [
|
|
|
|
# > I guess my inclination here is to recommend that musl users
|
|
|
|
# > carry a downstream patch to revert the commits in #3175 until
|
|
|
|
# > such time as they can update to the new musl.
|
|
|
|
# https://github.com/ostreedev/ostree/issues/3200#issuecomment-1974819192
|
|
|
|
(fetchpatch {
|
|
|
|
name = "revert-statx.diff";
|
|
|
|
url = "https://github.com/ostreedev/ostree/commit/f46cc0cd85b564e40e03c7438a41c8e57f6b836c.diff";
|
|
|
|
excludes = [ "ci/*" ];
|
|
|
|
revert = true;
|
|
|
|
hash = "sha256-LsXbRYh4hfjNdt1S384IPlSvtC5f2rgSTZEkIIBkT0g=";
|
|
|
|
})
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoconf
|
|
|
|
automake
|
|
|
|
libtool
|
2020-08-20 17:08:02 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
gtk-doc
|
|
|
|
gobject-introspection
|
|
|
|
which
|
|
|
|
makeWrapper
|
2021-04-05 15:23:46 +00:00
|
|
|
bison
|
2020-04-24 23:36:52 +00:00
|
|
|
libxslt
|
2020-08-20 17:08:02 +00:00
|
|
|
docbook-xsl-nons
|
2020-04-24 23:36:52 +00:00
|
|
|
docbook_xml_dtd_42
|
2022-10-21 18:38:19 +00:00
|
|
|
wrapGAppsNoGuiHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2022-10-21 18:38:19 +00:00
|
|
|
curl
|
2020-04-24 23:36:52 +00:00
|
|
|
glib
|
|
|
|
systemd
|
|
|
|
e2fsprogs
|
|
|
|
libsoup
|
2021-04-18 02:13:31 +00:00
|
|
|
glib-networking
|
2020-04-24 23:36:52 +00:00
|
|
|
gpgme
|
2022-03-05 16:20:37 +00:00
|
|
|
fuse3
|
2020-04-24 23:36:52 +00:00
|
|
|
libselinux
|
2020-08-20 17:08:02 +00:00
|
|
|
libsodium
|
2020-04-24 23:36:52 +00:00
|
|
|
libcap
|
|
|
|
libarchive
|
|
|
|
bzip2
|
|
|
|
xz
|
2020-11-24 20:58:05 +00:00
|
|
|
util-linuxMinimal # for libmount
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# for installed tests
|
|
|
|
testPython
|
|
|
|
gjs
|
|
|
|
];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
configureFlags = [
|
2022-10-21 18:38:19 +00:00
|
|
|
"--with-curl"
|
2020-04-24 23:36:52 +00:00
|
|
|
"--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
|
|
|
|
"--with-systemdsystemgeneratordir=${placeholder "out"}/lib/systemd/system-generators"
|
|
|
|
"--enable-installed-tests"
|
2020-08-20 17:08:02 +00:00
|
|
|
"--with-ed25519-libsodium"
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
makeFlags = [
|
|
|
|
"installed_testdir=${placeholder "installedTests"}/libexec/installed-tests/libostree"
|
|
|
|
"installed_test_metadir=${placeholder "installedTests"}/share/installed-tests/libostree"
|
2024-01-02 11:29:13 +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="
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2020-08-20 17:08:02 +00:00
|
|
|
preConfigure = ''
|
|
|
|
env NOCONFIGURE=1 ./autogen.sh
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postFixup = let
|
2021-01-15 22:18:51 +00:00
|
|
|
typelibPath = lib.makeSearchPath "/lib/girepository-1.0" [
|
2020-04-24 23:36:52 +00:00
|
|
|
(placeholder "out")
|
|
|
|
gobject-introspection
|
|
|
|
];
|
|
|
|
in ''
|
|
|
|
for test in $installedTests/libexec/installed-tests/libostree/*.js; do
|
|
|
|
wrapProgram "$test" --prefix GI_TYPELIB_PATH : "${typelibPath}"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
passthru = {
|
|
|
|
tests = {
|
2024-05-15 15:35:15 +00:00
|
|
|
musl = pkgsCross.musl64.ostree;
|
2020-04-24 23:36:52 +00:00
|
|
|
installedTests = nixosTests.installed-tests.ostree;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Git for operating system binaries";
|
2024-05-15 15:35:15 +00:00
|
|
|
homepage = "https://ostreedev.github.io/ostree/";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.lgpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ copumpkin ];
|
|
|
|
};
|
|
|
|
}
|