From 750afb7250756e56deddc15fff3754ba3642f3a8 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 25 Sep 2024 22:22:38 +0100 Subject: [PATCH] lowdown: 1.1.0 -> 1.1.2 Changes: - https://github.com/kristapsdz/lowdown/releases/tag/VERSION_1_1_1 - https://github.com/kristapsdz/lowdown/releases/tag/VERSION_1_1_2 --- pkgs/tools/typesetting/lowdown/default.nix | 48 +++++----------------- 1 file changed, 11 insertions(+), 37 deletions(-) diff --git a/pkgs/tools/typesetting/lowdown/default.nix b/pkgs/tools/typesetting/lowdown/default.nix index 7449be94e12c..d5b529b75594 100644 --- a/pkgs/tools/typesetting/lowdown/default.nix +++ b/pkgs/tools/typesetting/lowdown/default.nix @@ -1,5 +1,4 @@ { lib, stdenv, fetchurl, fixDarwinDylibNames, which, dieHook -, fetchpatch , enableShared ? !stdenv.hostPlatform.isStatic , enableStatic ? stdenv.hostPlatform.isStatic , enableDarwinSandbox ? true @@ -9,49 +8,15 @@ stdenv.mkDerivation rec { pname = "lowdown${lib.optionalString (stdenv.hostPlatform.isDarwin && !enableDarwinSandbox) "-unsandboxed"}"; - version = "1.1.0"; + version = "1.1.2"; outputs = [ "out" "lib" "dev" "man" ]; src = fetchurl { url = "https://kristaps.bsd.lv/lowdown/snapshots/lowdown-${version}.tar.gz"; - hash = "sha512-EpAWTz7Zy+2qqJGgzLrt0tK7WEZ+hHbdyqzAmMiaqc6uNXscR88git6/UbTjvB9Yanvetvw9huSuyhcORCEIug=="; + hash = "sha512-KHQi5NpMU6Kw4Ij+BoGE52aU0vIP1pgMhjnBAUdMh6GV/xHCxfTXJduqh9bSfVMeOim08aZSIM7iq1io0VS8LA=="; }; - patches = [ - # Improve UTF-8 handling on macOS by not treating bytes >=0x80, which tend to be - # UTF-8 continuation bytes, as control characters. - # - # This leaves control characters U+0080 through U+009F in the output - # (incorrectly) but doesn't mangle other UTF-8 characters, so it's a net - # win. - # - # See: https://github.com/kristapsdz/lowdown/pull/140 - (fetchpatch { - url = "https://github.com/kristapsdz/lowdown/commit/5a02866dd682363a8e4f6b344c223cfe8b597da9.diff"; - hash = "sha256-7tGhZJQQySeBv4h6A4r69BBbQkPRX/3JTw/80A8YXjQ="; - }) - (fetchpatch { - url = "https://github.com/kristapsdz/lowdown/commit/c033a6886e4d6efb948782fbc389fe5f673acf36.diff"; - hash = "sha256-7DvKFerAMoPifuTn7rOX4ru888HfBkpspH1opIbzj08="; - }) - - # Don't output a newline after .SH - # - # This fixes `makewhatis` output on macOS and (as a result) `man` - # completions for `fish` on macOS. - # - # See: https://github.com/kristapsdz/lowdown/pull/138 - (fetchpatch { - url = "https://github.com/kristapsdz/lowdown/commit/e05929a09a697de3d2eb14d0f0a087a6fae22e11.diff"; - hash = "sha256-P03W+hFeBKwfJB+DhGCPq0DtiOiLLc+0ZvWrWqXFvVU="; - }) - (fetchpatch { - url = "https://github.com/kristapsdz/lowdown/commit/9906f8ceac586c54eb39ae78105fd84653a89c33.diff"; - hash = "sha256-nBnAgTb8RDe/QpUhow3lyeR7UIVJX2o4lmP78e2fw/E="; - }) - ]; - nativeBuildInputs = [ which dieHook ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ fixDarwinDylibNames ]; @@ -70,6 +35,13 @@ stdenv.mkDerivation rec { runHook postConfigure ''; + # Fix rpath change on darwin to avoid failure like: + # error: install_name_tool: changing install names or + # rpaths can't be redone for: liblowdown.1.dylib (for architecture + # arm64) because larger + # https://github.com/NixOS/nixpkgs/pull/344532#issuecomment-238475791 + env.NIX_CFLAGS_LINK = lib.optionalString stdenv.hostPlatform.isDarwin "-headerpad_max_install_names"; + makeFlags = [ "bins" # prevents shared object from being built unnecessarily ]; @@ -109,8 +81,10 @@ stdenv.mkDerivation rec { installCheckPhase = lib.optionalString (!stdenv.hostPlatform.isDarwin || !enableDarwinSandbox) '' runHook preInstallCheck + echo '# TEST' > test.md $out/bin/lowdown test.md + runHook postInstallCheck '';