2018-12-15 03:50:31 +00:00
|
|
|
{ stdenv, lib, fetchzip, pkgconfig, cmake, perlPackages, curl, gtest, lzma, bzip2, lz4
|
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 {
|
|
|
|
name = "apt-${version}";
|
|
|
|
|
|
|
|
version = "1.4.6";
|
|
|
|
|
|
|
|
src = fetchzip {
|
|
|
|
url = "https://launchpad.net/ubuntu/+archive/primary/+files/apt_${version}.tar.xz";
|
|
|
|
sha256 = "0ahwhmscrmnpvl1r732wg93dzkhv8c1sph2yrqgsrhr73c1616ix";
|
|
|
|
};
|
|
|
|
|
2017-09-14 20:24:37 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
|
|
|
|
2017-06-14 04:36:52 +01:00
|
|
|
buildInputs = [
|
2018-12-15 03:50:31 +00:00
|
|
|
cmake perlPackages.perl curl gtest lzma bzip2 lz4 db dpkg libxslt.bin
|
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
|
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = ''
|
|
|
|
cmakeFlagsArray+=(
|
2018-05-22 14:47:28 +01:00
|
|
|
-DBERKELEY_DB_INCLUDE_DIRS=${db.dev}/include
|
2017-06-14 04:36:52 +01:00
|
|
|
-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"}
|
|
|
|
)
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "";
|
2017-08-01 21:03:30 +01:00
|
|
|
homepage = https://launchpad.net/ubuntu/+source/apt;
|
2017-06-14 04:36:52 +01:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ cstrahan ];
|
|
|
|
};
|
|
|
|
}
|