lowdown: 1.3.2 -> 2.0.2, nixVersions.nix_2_24: fix build against lowdown 2.0.2; lix: apply patches for lowdown >= 1.4 (#413730)

This commit is contained in:
sternenseemann 2025-07-28 16:25:39 +02:00 committed by GitHub
commit 4ee5da895e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 41 additions and 3 deletions

View File

@ -5,6 +5,7 @@
fixDarwinDylibNames,
which,
dieHook,
bmake,
enableShared ? !stdenv.hostPlatform.isStatic,
enableStatic ? stdenv.hostPlatform.isStatic,
enableDarwinSandbox ? true,
@ -16,7 +17,7 @@ stdenv.mkDerivation rec {
pname = "lowdown${
lib.optionalString (stdenv.hostPlatform.isDarwin && !enableDarwinSandbox) "-unsandboxed"
}";
version = "1.3.2";
version = "2.0.2";
outputs = [
"out"
@ -27,12 +28,13 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://kristaps.bsd.lv/lowdown/snapshots/lowdown-${version}.tar.gz";
hash = "sha512-IQmgPm2zE+B82Zdg+ldjtU/XI+qab9YRAzwzRMYv32KKjql0YLDEgc/m6DbgyCiNBkulD0dVExCtrTM+nBFHzw==";
hash = "sha512-cfzhuF4EnGmLJf5EGSIbWqJItY3npbRSALm+GarZ7SMU7Hr1xw0gtBFMpOdi5PBar4TgtvbnG4oRPh+COINGlA==";
};
nativeBuildInputs = [
which
dieHook
bmake # Uses FreeBSD's dialect
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ];
@ -74,7 +76,7 @@ stdenv.mkDerivation rec {
postInstall =
let
soVersion = "1";
soVersion = "2";
in
# Check that soVersion is up to date even if we are not on darwin

View File

@ -9,6 +9,7 @@
fetchgit,
fetchFromGitHub,
fetchFromGitea,
fetchpatch2,
rustPlatform,
editline,
ncurses,
@ -168,6 +169,15 @@ lib.makeExtensible (self: {
hash = "sha256-b5d+HnPcyHz0ZJW1+LZl4qm4LGTB/TiaDFQVlVL2xpE=";
};
patches = [
# Support for lowdown >= 1.4, https://gerrit.lix.systems/c/lix/+/3731
(fetchpatch2 {
name = "lix-2.91-lowdown-1.4.0.patch";
url = "https://git.lix.systems/lix-project/lix/commit/ecff59d77371b21fef229c33ebb629bc49a8fad5.patch";
sha256 = "sha256-2M5oId5kObwzpw67rddAPI2RbWPEVlGBrMUXZWqqmEo=";
})
];
docCargoDeps = rustPlatform.fetchCargoVendor {
name = "lix-doc-${version}";
inherit src;
@ -200,6 +210,15 @@ lib.makeExtensible (self: {
hash = "sha256-iP2iUDxA99RcgQyZROs7bQw8pqxa1vFudRqjAIHg9Iw=";
};
patches = [
# Support for lowdown >= 1.4, https://gerrit.lix.systems/c/lix/+/3731
(fetchpatch2 {
name = "lix-lowdown-1.4.0.patch";
url = "https://git.lix.systems/lix-project/lix/commit/858de5f47a1bfd33835ec97794ece339a88490f1.patch";
hash = "sha256-FfLO2dFSWV1qwcupIg8dYEhCHir2XX6/Hs89eLwd+SY=";
})
];
cargoDeps = rustPlatform.fetchCargoVendor {
name = "lix-${version}";
inherit src;
@ -231,6 +250,15 @@ lib.makeExtensible (self: {
hash = "sha256-Oqw04eboDM8rrUgAXiT7w5F2uGrQdt8sGX+Mk6mVXZQ=";
};
patches = [
# Support for lowdown >= 1.4, https://gerrit.lix.systems/c/lix/+/3731
(fetchpatch2 {
name = "lix-lowdown-1.4.0.patch";
url = "https://git.lix.systems/lix-project/lix/commit/858de5f47a1bfd33835ec97794ece339a88490f1.patch";
hash = "sha256-FfLO2dFSWV1qwcupIg8dYEhCHir2XX6/Hs89eLwd+SY=";
})
];
cargoDeps = rustPlatform.fetchCargoVendor {
name = "lix-${version}";
inherit src;

View File

@ -254,6 +254,14 @@ let
"--enable-lto"
];
env.CXXFLAGS = toString (
lib.optionals (lib.versionAtLeast lowdown.version "1.4.0") [
# Autotools based build system wasn't updated with the backport of
# https://github.com/NixOS/nix/pull/12115, so set the define explicitly.
"-DHAVE_LOWDOWN_1_4"
]
);
makeFlags = [
# gcc runs multi-threaded LTO using make and does not yet detect the new fifo:/path style
# of make jobserver. until gcc adds support for this we have to instruct make to use this