nixos-config/patches/quirc.patch
2024-08-04 13:39:08 +03:00

31 lines
1.2 KiB
Diff

From 2844e6ffb1a680752a0ec7d9615793f00874707f Mon Sep 17 00:00:00 2001
From: OPNA2608 <opna2608@protonmail.com>
Date: Sun, 21 Jul 2024 15:45:17 +0200
Subject: [PATCH] quirc: Fix FTBFS on Linux
https://github.com/dlbeer/quirc/commit/2c350d8aaf37246e538a2c93b2cce8c78600d2fc already includes a cp of libquirc.so, we can drop the Linux-only postInstall block.
---
pkgs/tools/graphics/quirc/default.nix | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/pkgs/tools/graphics/quirc/default.nix b/pkgs/tools/graphics/quirc/default.nix
index 938b9c37872f0f..b2d1e795155a35 100644
--- a/pkgs/tools/graphics/quirc/default.nix
+++ b/pkgs/tools/graphics/quirc/default.nix
@@ -50,13 +50,11 @@ stdenv.mkDerivation (finalAttrs: {
postInstall = ''
# don't install static library
rm $out/lib/libquirc.a
- '' + (if stdenv.isDarwin then ''
+ '' + lib.optionalString stdenv.isDarwin ''
# Set absolute install name to avoid the need for DYLD_LIBRARY_PATH
dylib=$out/lib/libquirc.${finalAttrs.version}.dylib
${stdenv.cc.targetPrefix}install_name_tool -id "$dylib" "$dylib"
- '' else ''
- ln -s $out/lib/libquirc.so.* $out/lib/libquirc.so
- '');
+ '';
meta = {
description = "Small QR code decoding library";