summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongun Seong <nevivurn@nevi.dev>2023-05-25 20:00:39 +0900
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2023-06-03 09:18:23 +0000
commit303b1db363d4c8ef3597042a8c30d7c55be61827 (patch)
treef2c70ef0235da1f24a64ca419513bcb0b8710c4a
parentpython3Packages.hickle: fixed failing unit tests (diff)
downloadnixpkgs-303b1db363d4c8ef3597042a8c30d7c55be61827.tar.gz
quickbms: fix build
(cherry picked from commit 3c779c3fa8f043e85f20323cad29216c28baae9b)
-rw-r--r--pkgs/tools/archivers/quickbms/0002-disable-openssl.patch10
-rw-r--r--pkgs/tools/archivers/quickbms/default.nix24
2 files changed, 32 insertions, 2 deletions
diff --git a/pkgs/tools/archivers/quickbms/0002-disable-openssl.patch b/pkgs/tools/archivers/quickbms/0002-disable-openssl.patch
new file mode 100644
index 000000000000..3d77f45e3f86
--- /dev/null
+++ b/pkgs/tools/archivers/quickbms/0002-disable-openssl.patch
@@ -0,0 +1,10 @@
+--- src/Makefile 2023-05-25 18:16:56.000296653 +0900
++++ src/Makefile 2023-05-25 18:17:00.772272861 +0900
+@@ -23,7 +23,6 @@
+ EXTRA_TARGETS = libs/amiga/amiga.s libs/powzix/*.cpp
+ CFLAGS += -msse2
+ endif
+-USE_OPENSSL = 1
+ endif
+
+ # -liconv and -fPIC are necessary on Android
diff --git a/pkgs/tools/archivers/quickbms/default.nix b/pkgs/tools/archivers/quickbms/default.nix
index d2f39ac2cf18..b8e1e9fc6f1c 100644
--- a/pkgs/tools/archivers/quickbms/default.nix
+++ b/pkgs/tools/archivers/quickbms/default.nix
@@ -1,4 +1,13 @@
-{ stdenv, lib, fetchzip, bzip2, lzo, openssl, zlib }:
+{ stdenv
+, lib
+, fetchzip
+, fetchpatch
+, bzip2
+, lzo
+, openssl_1_1
+, opensslSupport ? false
+, zlib
+}:
stdenv.mkDerivation rec {
version = "0.11.0";
@@ -9,7 +18,18 @@ stdenv.mkDerivation rec {
hash = "sha256-uQKTE36pLO8uhrX794utqaDGUeyqRz6zLCQFA7DYkNc=";
};
- buildInputs = [ bzip2 lzo openssl zlib ];
+ patches = [
+ # Fix errors on x86_64 and _rotl definition
+ (fetchpatch {
+ name = "0001-fix-compile.patch";
+ url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-compile.patch?h=quickbms&id=a2e3e4638295d7cfe39513bfef9447fb23154a6b";
+ hash = "sha256-49fT/L4BNzMYnq1SXhFMgSDLybLkz6KSbgKmUpZZu08=";
+ stripLen = 1;
+ })
+ ] ++ lib.optional (!opensslSupport) ./0002-disable-openssl.patch;
+
+ buildInputs = [ bzip2 lzo zlib ]
+ ++ lib.optional (opensslSupport) openssl_1_1;
makeFlags = [ "PREFIX=$(out)" ];