1 { lib, stdenv, fetchFromGitLab, pkg-config, scdoc, openssl, zlib
2 , luaSupport ? stdenv.hostPlatform == stdenv.buildPlatform, lua
5 stdenv.mkDerivation rec {
9 src = fetchFromGitLab {
10 domain = "gitlab.alpinelinux.org";
14 sha256 = "sha256-GtWwLQoN0106uErEDjPrwlz8pmOKdV3OrtfisFhGqoY=";
17 nativeBuildInputs = [ pkg-config scdoc ]
18 ++ lib.optionals luaSupport [ lua lua.pkgs.lua-zlib ];
19 buildInputs = [ openssl zlib ] ++ lib.optional luaSupport lua;
23 "CROSS_COMPILE=${stdenv.cc.targetPrefix}"
26 "LUA=${if luaSupport then "lua" else "no"}"
27 "LUA_LIBDIR=$(out)/lib/lua/${lib.versions.majorMinor lua.version}"
28 "MANDIR=$(out)/share/man"
29 "DOCDIR=$(out)/share/doc/apk"
30 "INCLUDEDIR=$(out)/include"
31 "PKGCONFIGDIR=$(out)/lib/pkgconfig"
34 env.NIX_CFLAGS_COMPILE = toString [
35 "-Wno-error=unused-result"
36 "-Wno-error=deprecated-declarations"
39 enableParallelBuilding = true;
42 homepage = "https://gitlab.alpinelinux.org/alpine/apk-tools";
43 description = "Alpine Package Keeper";
44 maintainers = with maintainers; [ qyliss ];
45 license = licenses.gpl2Only;
46 platforms = platforms.linux;