apk-tools: 2.10.5 -> 2.12.2; fix cross

Also clarify license.
This commit is contained in:
Alyssa Ross 2021-02-07 20:38:36 +00:00
parent 279e66e106
commit 27f273d391
No known key found for this signature in database
GPG Key ID: F9DBED4859B271C0

View File

@ -1,20 +1,29 @@
{ stdenv, lib, fetchurl, lua, openssl, pkg-config, zlib }:
{ lib, stdenv, fetchFromGitLab, pkg-config, scdoc, openssl, zlib
, luaSupport ? stdenv.hostPlatform == stdenv.buildPlatform, lua
}:
stdenv.mkDerivation rec {
pname = "apk-tools";
version = "2.10.5";
version = "2.12.2";
src = fetchurl {
url = "https://dev.alpinelinux.org/archive/apk-tools/apk-tools-${version}.tar.xz";
sha256 = "00z3fqnv8vk2czdm4p2q4sldq0n8sxyf2qfwppyk7wj59d2sq8dp";
src = fetchFromGitLab {
domain = "gitlab.alpinelinux.org";
owner = "alpine";
repo = "apk-tools";
rev = "v${version}";
sha256 = "1crx2xlswi7i0mwgzrfphpf49ghfnh79fi5dn1sl611j9sy9wa29";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ lua openssl zlib ];
nativeBuildInputs = [ pkg-config scdoc ]
++ lib.optionals luaSupport [ lua lua.pkgs.lua-zlib ];
buildInputs = [ openssl zlib ] ++ lib.optional luaSupport lua;
strictDeps = true;
makeFlags = [
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
"SBINDIR=$(out)/bin"
"LIBDIR=$(out)/lib"
"LUA=${if luaSupport then "lua" else "no"}"
"LUA_LIBDIR=$(out)/lib/lua/${lib.versions.majorMinor lua.version}"
"MANDIR=$(out)/share/man"
"DOCDIR=$(out)/share/doc/apk"
@ -30,7 +39,7 @@ stdenv.mkDerivation rec {
homepage = "https://gitlab.alpinelinux.org/alpine/apk-tools";
description = "Alpine Package Keeper";
maintainers = with maintainers; [ qyliss ];
license = licenses.gpl2;
license = licenses.gpl2Only;
platforms = platforms.unix;
broken = stdenv.isDarwin;
};