2021-02-13 14:23:35 +00:00
|
|
|
{ lib, stdenv, fetchFromGitLab, pkg-config, scdoc, openssl, zlib
|
|
|
|
, luaSupport ? stdenv.hostPlatform == stdenv.buildPlatform, lua
|
|
|
|
}:
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "apk-tools";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "2.12.8";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.alpinelinux.org";
|
|
|
|
owner = "alpine";
|
|
|
|
repo = "apk-tools";
|
|
|
|
rev = "v${version}";
|
2021-12-06 16:07:01 +00:00
|
|
|
sha256 = "1bqrvdyqqllzsyx9gdkqmd17wxcmli6ljwxxa8wj9gzg9pqhlhqz";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
nativeBuildInputs = [ pkg-config scdoc ]
|
|
|
|
++ lib.optionals luaSupport [ lua lua.pkgs.lua-zlib ];
|
|
|
|
buildInputs = [ openssl zlib ] ++ lib.optional luaSupport lua;
|
|
|
|
strictDeps = true;
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
makeFlags = [
|
2021-02-13 14:23:35 +00:00
|
|
|
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
|
2020-07-18 16:06:22 +00:00
|
|
|
"SBINDIR=$(out)/bin"
|
|
|
|
"LIBDIR=$(out)/lib"
|
2021-02-13 14:23:35 +00:00
|
|
|
"LUA=${if luaSupport then "lua" else "no"}"
|
2020-07-18 16:06:22 +00:00
|
|
|
"LUA_LIBDIR=$(out)/lib/lua/${lib.versions.majorMinor lua.version}"
|
|
|
|
"MANDIR=$(out)/share/man"
|
|
|
|
"DOCDIR=$(out)/share/doc/apk"
|
|
|
|
"INCLUDEDIR=$(out)/include"
|
|
|
|
"PKGCONFIGDIR=$(out)/lib/pkgconfig"
|
|
|
|
];
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = [ "-Wno-error=unused-result" ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://gitlab.alpinelinux.org/alpine/apk-tools";
|
|
|
|
description = "Alpine Package Keeper";
|
|
|
|
maintainers = with maintainers; [ qyliss ];
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.gpl2Only;
|
2020-07-18 16:06:22 +00:00
|
|
|
platforms = platforms.unix;
|
2020-12-09 12:39:15 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
}
|