nixpkgs/pkgs/tools/package-management/apk-tools/default.nix

47 lines
1.3 KiB
Nix
Raw Normal View History

{ lib, stdenv, fetchFromGitLab, pkg-config, scdoc, openssl, zlib
, luaSupport ? stdenv.hostPlatform == stdenv.buildPlatform, lua
}:
2020-06-17 15:12:56 +01:00
stdenv.mkDerivation rec {
pname = "apk-tools";
version = "2.12.2";
2020-06-17 15:12:56 +01:00
src = fetchFromGitLab {
domain = "gitlab.alpinelinux.org";
owner = "alpine";
repo = "apk-tools";
rev = "v${version}";
sha256 = "1crx2xlswi7i0mwgzrfphpf49ghfnh79fi5dn1sl611j9sy9wa29";
2020-06-17 15:12:56 +01:00
};
nativeBuildInputs = [ pkg-config scdoc ]
++ lib.optionals luaSupport [ lua lua.pkgs.lua-zlib ];
buildInputs = [ openssl zlib ] ++ lib.optional luaSupport lua;
strictDeps = true;
2020-06-17 15:12:56 +01:00
makeFlags = [
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
2020-06-17 15:12:56 +01:00
"SBINDIR=$(out)/bin"
"LIBDIR=$(out)/lib"
"LUA=${if luaSupport then "lua" else "no"}"
2020-06-17 15:12:56 +01: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 ];
license = licenses.gpl2Only;
2020-06-17 15:12:56 +01:00
platforms = platforms.unix;
2020-12-09 00:34:07 +00:00
broken = stdenv.isDarwin;
2020-06-17 15:12:56 +01:00
};
}