2021-01-17 09:17:16 +00:00
|
|
|
{ stdenv, lib, fetchurl, pkg-config, cmake, perlPackages, curl, gtest
|
2019-11-17 15:53:34 +00:00
|
|
|
, gnutls, libtasn1, lzma, bzip2, lz4, zstd, libseccomp, udev
|
2017-06-14 04:36:52 +01:00
|
|
|
, db, dpkg, libxslt, docbook_xsl, docbook_xml_dtd_45
|
|
|
|
|
|
|
|
# used when WITH_DOC=ON
|
|
|
|
, w3m
|
|
|
|
, doxygen
|
|
|
|
|
|
|
|
# used when WITH_NLS=ON
|
|
|
|
, gettext
|
|
|
|
|
|
|
|
# opts
|
|
|
|
, withDocs ? true
|
|
|
|
, withNLS ? true
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "apt";
|
2019-11-17 15:53:34 +00:00
|
|
|
version = "1.8.4";
|
2017-06-14 04:36:52 +01:00
|
|
|
|
2019-11-17 15:53:34 +00:00
|
|
|
src = fetchurl {
|
|
|
|
url = "mirror://debian/pool/main/a/apt/apt_${version}.tar.xz";
|
|
|
|
sha256 = "0gn4srqaaym85gc8nldqkv01477kdwr136an2nlpbdrsbx3y83zl";
|
2017-06-14 04:36:52 +01:00
|
|
|
};
|
|
|
|
|
2021-01-17 09:17:16 +00:00
|
|
|
nativeBuildInputs = [ pkg-config cmake gtest libxslt.bin ];
|
2017-09-14 20:24:37 +01:00
|
|
|
|
2017-06-14 04:36:52 +01:00
|
|
|
buildInputs = [
|
2019-11-17 15:53:34 +00:00
|
|
|
perlPackages.perl curl gnutls libtasn1 lzma bzip2 lz4 zstd libseccomp udev db dpkg
|
2017-06-14 04:36:52 +01:00
|
|
|
] ++ lib.optionals withDocs [
|
2018-12-15 03:50:31 +00:00
|
|
|
doxygen perlPackages.Po4a w3m docbook_xml_dtd_45
|
2017-06-14 04:36:52 +01:00
|
|
|
] ++ lib.optionals withNLS [
|
|
|
|
gettext
|
|
|
|
];
|
|
|
|
|
2019-11-17 15:53:34 +00:00
|
|
|
cmakeFlags = [
|
|
|
|
"-DBERKELEY_DB_INCLUDE_DIRS=${db.dev}/include"
|
|
|
|
"-DGNUTLS_INCLUDE_DIR=${gnutls.dev}/include"
|
|
|
|
"-DDOCBOOK_XSL=${docbook_xsl}/share/xml/docbook-xsl"
|
|
|
|
"-DROOT_GROUP=root"
|
|
|
|
"-DWITH_DOC=${if withDocs then "ON" else "OFF"}"
|
|
|
|
"-DUSE_NLS=${if withNLS then "ON" else "OFF"}"
|
|
|
|
];
|
2017-06-14 04:36:52 +01:00
|
|
|
|
|
|
|
meta = with lib; {
|
2019-11-17 15:53:34 +00:00
|
|
|
description = "Command-line package management tools used on Debian-based systems";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://salsa.debian.org/apt-team/apt";
|
2017-06-14 04:36:52 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ cstrahan ];
|
|
|
|
};
|
|
|
|
}
|