Skip to content

Commit 966f79b

Browse files
committed
pkgsMusl.ostree: fix build
Nixpkgs currently uses musl 1.2.3, which does not provide a statx(2) wrapper, which ostree now depends upon. Work on upgrading musl is ongoing, but for now, to keep ostree building, let's follow upstream's recommendation and revert the statx changes. Once the musl upgrade is complete, this change can be reverted. I've applied the patches conditionally, only for musl, to avoid impacting functionality for other platforms. Fixes: 1a56b35 ("ostree: version bump and removing old patches")
1 parent 5dd187f commit 966f79b

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

pkgs/tools/misc/ostree/default.nix

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{ stdenv
22
, lib
33
, fetchurl
4+
, fetchpatch
45
, substituteAll
56
, pkg-config
67
, gtk-doc
@@ -51,6 +52,19 @@ in stdenv.mkDerivation rec {
5152
sha256 = "sha256-Y8kZCCEzOsc3Pg2SPkwnZrJevc/fTvtEy1koxlidn8s=";
5253
};
5354

55+
patches = lib.optionals stdenv.hostPlatform.isMusl [
56+
# > I guess my inclination here is to recommend that musl users
57+
# > carry a downstream patch to revert the commits in #3175 until
58+
# > such time as they can update to the new musl.
59+
# https://github.com/ostreedev/ostree/issues/3200#issuecomment-1974819192
60+
(fetchpatch {
61+
name = "revert-statx.diff";
62+
url = "https://github.com/ostreedev/ostree/commit/f46cc0cd85b564e40e03c7438a41c8e57f6b836c.diff";
63+
excludes = [ "ci/*" ];
64+
revert = true;
65+
hash = "sha256-LsXbRYh4hfjNdt1S384IPlSvtC5f2rgSTZEkIIBkT0g=";
66+
})
67+
];
5468

5569
nativeBuildInputs = [
5670
autoconf

0 commit comments

Comments
 (0)