Commit fe28eb11 authored by Sergei Zimmerman's avatar Sergei Zimmerman
Browse files

runzip: fix build

Configure script produces a cryptic message:

```
configure:4540: error: ZLIB version too old, please install at least v1.1.2
```

It's actually misleading and comes from the vendored libzip 0.7.1 configure check.
It fails due to do `-Wimplicit-int`:

```
conftest.c:16:16: error: type defaults to 'int' in declaration of 'unzOpen' [-Wimplicit-int]
   16 | extern ZEXPORT unzOpen (const char *path);
```

Vendored libzip is pretty heavily modified and unvendoring seems impossible.
Furthermore, libzip from nixpkgs in buildInputs
is actually unused and can be dropped - only zlib is necessary.
parent fc7039f0
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -2,8 +2,8 @@
  lib,
  stdenv,
  fetchFromGitHub,
  libzip,
  libiconv,
  zlib,
  autoreconfHook,
}:

@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
  nativeBuildInputs = [ autoreconfHook ];
  buildInputs = [
    libiconv
    libzip
    zlib
  ];

  src = fetchFromGitHub {
@@ -24,6 +24,11 @@ stdenv.mkDerivation rec {
    sha256 = "0l5zbb5hswxczigvyal877j0aiq3fc01j3gv88bvy7ikyvw3lc07";
  };

  env.NIX_CFLAGS_COMPILE = toString [
    "-Wno-error=implicit-int"
    "-Wno-error=incompatible-pointer-types"
  ];

  meta = {
    description = "Tool to convert filename encoding inside a ZIP archive";
    license = lib.licenses.bsd2;