diff options
author | Charles Strahan <charles@cstrahan.com> | 2017-06-13 23:36:52 -0400 |
---|---|---|
committer | Charles Strahan <charles@cstrahan.com> | 2017-06-27 21:39:07 -0400 |
commit | 7f8e3f87b3d7bfd7a1ad32d155b411c809bfa7d2 (patch) | |
tree | b3c53482d73a6203c34bbddac5779fc7192f5167 /pkgs/tools/package-management | |
parent | 8e73afb2e13c3717044aea3de2ad6e7085caf589 (diff) | |
download | nixlib-7f8e3f87b3d7bfd7a1ad32d155b411c809bfa7d2.tar nixlib-7f8e3f87b3d7bfd7a1ad32d155b411c809bfa7d2.tar.gz nixlib-7f8e3f87b3d7bfd7a1ad32d155b411c809bfa7d2.tar.bz2 nixlib-7f8e3f87b3d7bfd7a1ad32d155b411c809bfa7d2.tar.lz nixlib-7f8e3f87b3d7bfd7a1ad32d155b411c809bfa7d2.tar.xz nixlib-7f8e3f87b3d7bfd7a1ad32d155b411c809bfa7d2.tar.zst nixlib-7f8e3f87b3d7bfd7a1ad32d155b411c809bfa7d2.zip |
apt: init at 1.4.6
Diffstat (limited to 'pkgs/tools/package-management')
-rw-r--r-- | pkgs/tools/package-management/apt/default.nix | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/pkgs/tools/package-management/apt/default.nix b/pkgs/tools/package-management/apt/default.nix new file mode 100644 index 000000000000..de1c24050761 --- /dev/null +++ b/pkgs/tools/package-management/apt/default.nix @@ -0,0 +1,65 @@ +{ stdenv, lib, fetchzip, pkgconfig, cmake, perl, curl, gtest, lzma, bzip2 , lz4 +, db, dpkg, libxslt, docbook_xsl, docbook_xml_dtd_45 + +# used when WITH_DOC=ON +, w3m +, Po4a +, 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"; + }; + + buildInputs = [ + pkgconfig cmake perl curl gtest lzma bzip2 lz4 db dpkg libxslt.bin + ] ++ lib.optionals withDocs [ + doxygen Po4a w3m + ] ++ lib.optionals withNLS [ + gettext + ]; + + preConfigure = '' + export PERL5LIB="$PERL5LIB''${PERL5LIB:+:}${Po4a}/lib/perl5"; + + cmakeFlagsArray+=( + -DBERKELEY_DB_INCLUDE_DIRS="${db}"/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"} + ) + + for f in doc/*; do + if [[ -f "$f" ]]; then + substituteInPlace "$f" \ + --replace \ + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" \ + "${docbook_xml_dtd_45}/xml/dtd/docbook/docbookx.dtd" + fi + done + ''; + + enableParallelBuilding = true; + + meta = with lib; { + description = ""; + homepage = "https://launchpad.net/ubuntu/+source/apt"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = with maintainers; [ cstrahan ]; + }; +} |