1{
2 lib,
3 stdenv,
4 fetchurl,
5}:
6
7stdenv.mkDerivation rec {
8 pname = "cabextract";
9 version = "1.11";
10
11 src = fetchurl {
12 url = "https://www.cabextract.org.uk/cabextract-${version}.tar.gz";
13 sha256 = "sha256-tVRtsRVeTHGP89SyeFc2BPMN1kw8W/1GV80Im4I6OsY=";
14 };
15
16 # Let's assume that fnmatch works for cross-compilation, otherwise it gives an error:
17 # undefined reference to `rpl_fnmatch'.
18 configureFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
19 "ac_cv_func_fnmatch_works=yes"
20 ];
21
22 meta = with lib; {
23 homepage = "https://www.cabextract.org.uk/";
24 description = "Free Software for extracting Microsoft cabinet files";
25 platforms = platforms.all;
26 license = licenses.gpl3;
27 maintainers = with maintainers; [ pSub ];
28 mainProgram = "cabextract";
29 };
30}