Skip to content

Commit 6d50a8b

Browse files
committed
refactor: use 7zip from nixpkgs
1 parent b73b796 commit 6d50a8b

File tree

2 files changed

+4
-79
lines changed

2 files changed

+4
-79
lines changed

7zip/001-werror.patch

-40
This file was deleted.

7zip/default.nix

+4-39
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,10 @@
22
, fetchurl
33
, gnumake
44
, system
5+
, _7zz
56
, ...
67
}:
78

8-
stdenv.mkDerivation rec {
9-
pname = "7zip";
10-
version = "23.01";
11-
12-
src = fetchurl {
13-
url = "https://www.7-zip.org/a/7z2301-src.tar.xz";
14-
sha256 = "0x4zpzjfnn0ggjprz30fawdvb014icz9j14r9n1a3rb0fc072q1m";
15-
};
16-
17-
patches = [ ./000-dangerous-links.patch ./001-werror.patch ];
18-
19-
arch = {
20-
"x86_64-darwin" = "x64";
21-
"aarch64-darwin" = "arm64";
22-
}.${system} or (throw "unknown system ${system}");
23-
24-
sourceRoot = ".";
25-
26-
nativeBuildInputs = [ gnumake ];
27-
28-
#setupHook = ./setup-hook.sh;
29-
30-
dontConfigure = true;
31-
32-
buildPhase = ''
33-
export MACOSX_DEPLOYMENT_TARGET=11.0
34-
cd CPP/7zip/Bundles/Alone2
35-
make -f ../../cmpl_mac_${arch}.mak LOCAL_FLAGS_ST=-Wno-extra-semi-stmt
36-
'';
37-
38-
installPhase = ''
39-
mkdir -p $out/bin
40-
cp b/m_${arch}/7zz $out/bin
41-
'';
42-
43-
}
44-
45-
46-
9+
_7zz.overrideAttrs (prev: {
10+
patches = prev.patches ++ [ ./000-dangerous-links.patch ];
11+
})

0 commit comments

Comments
 (0)