diff options
Diffstat (limited to 'pkgs/tools')
29 files changed, 94 insertions, 49 deletions
diff --git a/pkgs/tools/X11/xnee/default.nix b/pkgs/tools/X11/xnee/default.nix index d2236dfe354..c16da204f2f 100644 --- a/pkgs/tools/X11/xnee/default.nix +++ b/pkgs/tools/X11/xnee/default.nix @@ -33,9 +33,10 @@ stdenv.mkDerivation rec { --replace 'LIBSEMA="CCC"' 'LIBSEMA=""' ''; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ libX11 xorgproto libXext libXtst gtk2 - libXi pkg-config + libXi texinfo ]; diff --git a/pkgs/tools/admin/tigervnc/default.nix b/pkgs/tools/admin/tigervnc/default.nix index 549096ec0e4..724301854b4 100644 --- a/pkgs/tools/admin/tigervnc/default.nix +++ b/pkgs/tools/admin/tigervnc/default.nix @@ -92,7 +92,7 @@ stdenv.mkDerivation rec { --with-xkb-path=${xkeyboard_config}/share/X11/xkb \ --with-xkb-bin-directory=${xorg.xkbcomp}/bin \ --with-xkb-output=$out/share/X11/xkb/compiled - make TIGERVNC_SRC=$src TIGERVNC_BUILDDIR=`pwd`/../.. -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES + make TIGERVNC_SRC=$src TIGERVNC_BUILDDIR=`pwd`/../.. -j$NIX_BUILD_CORES popd '' + lib.optionalString stdenv.isDarwin '' make dmg diff --git a/pkgs/tools/audio/midimonster/default.nix b/pkgs/tools/audio/midimonster/default.nix index 3792d997aa0..841704427c2 100644 --- a/pkgs/tools/audio/midimonster/default.nix +++ b/pkgs/tools/audio/midimonster/default.nix @@ -19,7 +19,8 @@ stdenv.mkDerivation rec { pname = "midimonster"; version = "0.6.0"; - buildInputs = [pkg-config gnumake gcc lua5_4 openssl jack1 python3 alsa-lib ncurses libevdev]; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [gnumake gcc lua5_4 openssl jack1 python3 alsa-lib ncurses libevdev]; src = fetchFromGitHub { repo = "midimonster"; diff --git a/pkgs/tools/audio/mpdcron/default.nix b/pkgs/tools/audio/mpdcron/default.nix index 94ba5a56d03..924181608af 100644 --- a/pkgs/tools/audio/mpdcron/default.nix +++ b/pkgs/tools/audio/mpdcron/default.nix @@ -31,10 +31,9 @@ in stdenv.mkDerivation { sha256 = "0vdksf6lcgmizqr5mqp0bbci259k0dj7gpmhx32md41jlmw5skaw"; }; - nativeBuildInputs = [ autoconf automake ]; + nativeBuildInputs = [ autoconf automake pkg-config ]; buildInputs = [ libtool - pkg-config glib libdaemon pandoc diff --git a/pkgs/tools/backup/dump/default.nix b/pkgs/tools/backup/dump/default.nix index 75a449a1276..f9e1b68ac39 100644 --- a/pkgs/tools/backup/dump/default.nix +++ b/pkgs/tools/backup/dump/default.nix @@ -13,7 +13,8 @@ stdenv.mkDerivation rec { sha256 = "sha256-0CGs3k+77T2T662YFCL2cfSNZrKeyI196DZC7Pv/T9A="; }; - buildInputs = [ e2fsprogs pkg-config ncurses readline ]; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ e2fsprogs ncurses readline ]; meta = with lib; { homepage = "https://dump.sourceforge.io/"; diff --git a/pkgs/tools/compression/gzip/default.nix b/pkgs/tools/compression/gzip/default.nix index bd28ca63e80..771188a98cd 100644 --- a/pkgs/tools/compression/gzip/default.nix +++ b/pkgs/tools/compression/gzip/default.nix @@ -24,7 +24,14 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ xz.bin ]; - makeFlags = [ "SHELL=/bin/sh" "GREP=grep" ]; + makeFlags = [ + "SHELL=/bin/sh" + "GREP=grep" + # gzip 1.12 doesn't build `zless` unless it can find `less`, but we + # can avoid having `less` as a build input if we just override these. + "ZLESS_MAN=zless.1" + "ZLESS_PROG=zless" + ]; # Many gzip executables are shell scripts that depend upon other gzip # executables being in $PATH. Rather than try to re-write all the diff --git a/pkgs/tools/compression/lz4/default.nix b/pkgs/tools/compression/lz4/default.nix index 579ee9b2094..584b000a3e2 100644 --- a/pkgs/tools/compression/lz4/default.nix +++ b/pkgs/tools/compression/lz4/default.nix @@ -14,12 +14,10 @@ stdenv.mkDerivation rec { owner = pname; }; - patches = lib.optionals (!enableShared) [ - # This patch is already part of the `dev` branch. - # Remove when upgrading to the next version. - (fetchpatch { - name = "lz4-fix-BUILD_SHARED=no.patch"; - url = "https://github.com/lz4/lz4/commit/5ccbd38277989ae6a728171d59ae03bad6f2f4d5.patch"; + patches = [ + (fetchpatch { # https://github.com/lz4/lz4/pull/1162 + name = "build-shared-no.patch"; + url = "https://github.com/lz4/lz4/commit/851ef4b23c7cbf4ceb2ba1099666a8b5ec4fa195.patch"; sha256 = "sha256-P+/uz3m7EAmHgXF/1Vncc0uKKxNVq6HNIsElx0rGxpw="; }) ]; diff --git a/pkgs/tools/filesystems/httpfs/default.nix b/pkgs/tools/filesystems/httpfs/default.nix index 61843e4c65b..24233a8441d 100644 --- a/pkgs/tools/filesystems/httpfs/default.nix +++ b/pkgs/tools/filesystems/httpfs/default.nix @@ -10,8 +10,9 @@ stdenv.mkDerivation rec { sha256 = "1h8ggvhw30n2r6w11n1s458ypggdqx6ldwd61ma4yd7binrlpjq1"; }; + nativeBuildInputs = [ pkg-config ]; buildInputs = - [ pkg-config fuse openssl + [ fuse openssl asciidoc docbook_xml_dtd_45 docbook_xsl libxml2 libxslt ]; diff --git a/pkgs/tools/graphics/s2png/default.nix b/pkgs/tools/graphics/s2png/default.nix index c1124880944..d3f8b74512a 100644 --- a/pkgs/tools/graphics/s2png/default.nix +++ b/pkgs/tools/graphics/s2png/default.nix @@ -11,7 +11,8 @@ stdenv.mkDerivation rec { sha256 = "0y3crfm0jqprgxamlly713cka2x1bp6z63p1lw9wh4wc37kpira6"; }; - buildInputs = [ diffutils gd pkg-config ]; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ diffutils gd ]; installFlags = [ "prefix=" "DESTDIR=$(out)" ]; meta = { diff --git a/pkgs/tools/inputmethods/m17n-lib/default.nix b/pkgs/tools/inputmethods/m17n-lib/default.nix index cc290ab0eca..ff3b0afad25 100644 --- a/pkgs/tools/inputmethods/m17n-lib/default.nix +++ b/pkgs/tools/inputmethods/m17n-lib/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, m17n_db, autoreconfHook, pkg-config }: +{ lib, stdenv, fetchurl, fetchpatch, m17n_db, autoreconfHook, pkg-config }: stdenv.mkDerivation rec { pname = "m17n-lib"; version = "1.8.0"; @@ -8,6 +8,17 @@ stdenv.mkDerivation rec { sha256 = "0jp61y09xqj10mclpip48qlfhniw8gwy8b28cbzxy8hq8pkwmfkq"; }; + patches = [ + (fetchpatch { + # Patch pending upstream inclusion: + # https://savannah.nongnu.org/bugs/index.php?61377 + name = "parallel-build.patch"; + url = "https://savannah.nongnu.org/bugs/download.php?file_id=53704"; + hash = "sha256-1smKSIFVRJZSwCv0NiUsnndxKcPnJ/wqzH8+ka6nfNM="; + excludes = [ "src/ChangeLog" ]; + }) + ]; + strictDeps = true; # reconf needed to sucesfully cross-compile @@ -17,10 +28,7 @@ stdenv.mkDerivation rec { m17n_db ]; - # Fails parallel build due to missing intra-package depends: - # https://savannah.nongnu.org/bugs/index.php?61377 - # make[2]: *** No rule to make target '../src/libm17n-core.la', needed by 'libm17n.la'. Stop. - enableParallelBuilding = false; + enableParallelBuilding = true; meta = { homepage = "https://www.nongnu.org/m17n/"; diff --git a/pkgs/tools/misc/cpuminer/default.nix b/pkgs/tools/misc/cpuminer/default.nix index 27bf0ec5374..eb7a73e469c 100644 --- a/pkgs/tools/misc/cpuminer/default.nix +++ b/pkgs/tools/misc/cpuminer/default.nix @@ -19,7 +19,8 @@ stdenv.mkDerivation rec { patchPhase = if stdenv.cc.isClang then "${perl}/bin/perl ./nomacro.pl" else null; - buildInputs = [ curl jansson autoreconfHook ]; + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = [ curl jansson ]; configureFlags = [ "CFLAGS=-O3" ]; diff --git a/pkgs/tools/misc/expect/default.nix b/pkgs/tools/misc/expect/default.nix index 5a792c040b3..45f45e89e82 100644 --- a/pkgs/tools/misc/expect/default.nix +++ b/pkgs/tools/misc/expect/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, buildPackages, fetchurl, tcl, makeWrapper, autoreconfHook, fetchpatch }: +{ lib, stdenv, buildPackages, fetchurl, tcl, makeWrapper, autoreconfHook, fetchpatch, substituteAll }: tcl.mkTclDerivation rec { pname = "expect"; @@ -14,6 +14,10 @@ tcl.mkTclDerivation rec { url = "https://raw.githubusercontent.com/buildroot/buildroot/c05e6aa361a4049eabd8b21eb64a34899ef83fc7/package/expect/0001-enable-cross-compilation.patch"; sha256 = "1jwx2l1slidvcpahxbyqs942l81jd62rzbxliyd9lwysk38c8b6b"; }) + (substituteAll { + src = ./fix-cross-compilation.patch; + tcl = "${buildPackages.tcl}/bin/tclsh"; + }) ]; postPatch = '' diff --git a/pkgs/tools/misc/expect/fix-cross-compilation.patch b/pkgs/tools/misc/expect/fix-cross-compilation.patch new file mode 100644 index 00000000000..8edc4bea39d --- /dev/null +++ b/pkgs/tools/misc/expect/fix-cross-compilation.patch @@ -0,0 +1,11 @@ +--- a/Makefile.in 2022-09-07 21:46:37.090519258 +0200 ++++ b/Makefile.in 2022-09-07 21:46:21.462592279 +0200 +@@ -380,7 +380,7 @@ + cp $(DIST_ROOT)/$(PKG_DIR).tar.gz $(top_builddir) + + $(SCRIPTS): +- $(TCLSH) $(srcdir)/fixline1 $(SHORT_BINDIR) < $(srcdir)/example/$@ > $@ ++ @tcl@ $(srcdir)/fixline1 $(SHORT_BINDIR) < $(srcdir)/example/$@ > $@ + + ## We cannot use TCL_LIBS below (after TCL_LIB_SPEC) because its + ## expansion references the contents of LIBS, which contains linker diff --git a/pkgs/tools/misc/notify-desktop/default.nix b/pkgs/tools/misc/notify-desktop/default.nix index c906443b07c..22b5035da51 100644 --- a/pkgs/tools/misc/notify-desktop/default.nix +++ b/pkgs/tools/misc/notify-desktop/default.nix @@ -11,7 +11,8 @@ stdenv.mkDerivation { sha256 = "1brcvl2fx0yzxj9mc8hzfl32zdka1f1bxpzsclcsjplyakyinr1a"; }; - buildInputs = [ dbus pkg-config ]; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ dbus ]; installPhase = '' mkdir -p $out/bin diff --git a/pkgs/tools/misc/popsicle/default.nix b/pkgs/tools/misc/popsicle/default.nix index e9369270fcd..bae9465c7cb 100644 --- a/pkgs/tools/misc/popsicle/default.nix +++ b/pkgs/tools/misc/popsicle/default.nix @@ -49,7 +49,7 @@ rustPlatform.buildRustPackage.override { stdenv = stdenv; } rec { postPatch = '' # Have to do this here instead of in preConfigure because # cargoDepsCopy gets unset after postPatch. - configureFlagsArray+=("RUST_VENDORED_SOURCES=$NIX_BUILD_TOP/$cargoDepsCopy") + configureFlagsArray+=("RUST_VENDORED_SOURCES=$cargoDepsCopy") ''; makeFlags = [ diff --git a/pkgs/tools/networking/nss-mdns/default.nix b/pkgs/tools/networking/nss-mdns/default.nix index 238c0c364f9..f2af99a922f 100644 --- a/pkgs/tools/networking/nss-mdns/default.nix +++ b/pkgs/tools/networking/nss-mdns/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { hash = "sha256-iRaf9/gu9VkGi1VbGpxvC5q+0M8ivezCz/oAKEg5V1M="; }; - buildInputs = [ autoreconfHook pkg-config ]; + nativeBuildInputs = [ autoreconfHook pkg-config ]; # Note: Although `nss-mdns' works by talking to `avahi-daemon', it # doesn't depend on the Avahi libraries. Instead, it contains # hand-written D-Bus code to talk to the Avahi daemon. diff --git a/pkgs/tools/networking/ofono/default.nix b/pkgs/tools/networking/ofono/default.nix index 80e37782154..3733998c10b 100644 --- a/pkgs/tools/networking/ofono/default.nix +++ b/pkgs/tools/networking/ofono/default.nix @@ -12,14 +12,14 @@ stdenv.mkDerivation rec { pname = "ofono"; - version = "1.34"; + version = "2.0"; outputs = [ "out" "dev" ]; src = fetchgit { url = "git://git.kernel.org/pub/scm/network/ofono/ofono.git"; rev = version; - sha256 = "sha256-mqltc+/RmQO8awP+J7p9fCVhNsEYA3SgxeV5Gkr1srg="; + sha256 = "sha256-T8rfReruvHGQCN9IDGIrFCoNjFKKMnUGPKzxo2HTZFQ="; }; patches = [ diff --git a/pkgs/tools/networking/sipsak/default.nix b/pkgs/tools/networking/sipsak/default.nix index 668dc18f8ac..89a7d706ccd 100644 --- a/pkgs/tools/networking/sipsak/default.nix +++ b/pkgs/tools/networking/sipsak/default.nix @@ -4,8 +4,8 @@ stdenv.mkDerivation rec { pname = "sipsak"; version = "4.1.2.1"; + nativeBuildInputs = [ autoreconfHook ]; buildInputs = [ - autoreconfHook openssl c-ares ]; diff --git a/pkgs/tools/networking/unbound/default.nix b/pkgs/tools/networking/unbound/default.nix index 189cc14ff1b..25fcc1bcc39 100644 --- a/pkgs/tools/networking/unbound/default.nix +++ b/pkgs/tools/networking/unbound/default.nix @@ -48,20 +48,20 @@ stdenv.mkDerivation rec { pname = "unbound"; - version = "1.16.2"; + version = "1.16.3"; src = fetchurl { url = "https://nlnetlabs.nl/downloads/unbound/unbound-${version}.tar.gz"; - hash = "sha256-LjLyg4IMJMUcod2K/s/bdHxzhaE3q+hlyZ20sldANYE="; + hash = "sha256-6gxmZeLDMlt2nqwd/M1g/hgo1fz2YmUAOezLP2ftso4="; }; outputs = [ "out" "lib" "man" ]; # "dev" would only split ~20 kB - nativeBuildInputs = [ makeWrapper ] + nativeBuildInputs = [ makeWrapper pkg-config ] ++ lib.optionals withPythonModule [ swig ]; buildInputs = [ openssl nettle expat libevent ] - ++ lib.optionals withSystemd [ pkg-config systemd ] + ++ lib.optionals withSystemd [ systemd ] ++ lib.optionals withDoH [ libnghttp2 ] ++ lib.optionals withPythonModule [ python ]; diff --git a/pkgs/tools/security/chrome-token-signing/default.nix b/pkgs/tools/security/chrome-token-signing/default.nix index 18104aa7710..8081c7ef6eb 100644 --- a/pkgs/tools/security/chrome-token-signing/default.nix +++ b/pkgs/tools/security/chrome-token-signing/default.nix @@ -11,7 +11,8 @@ mkDerivation rec { sha256 = "sha256-wKy/RVR7jx5AkMJgHXsuV+jlzyfH5nDRggcIUgh2ML4="; }; - buildInputs = [ qmake pcsclite pkg-config ]; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ qmake pcsclite ]; dontUseQmakeConfigure = true; patchPhase = '' diff --git a/pkgs/tools/security/ecryptfs/default.nix b/pkgs/tools/security/ecryptfs/default.nix index cd90342738e..777aaea41ec 100644 --- a/pkgs/tools/security/ecryptfs/default.nix +++ b/pkgs/tools/security/ecryptfs/default.nix @@ -35,11 +35,11 @@ stdenv.mkDerivation rec { configureFlags = lib.optionals (!enablePython) [ "--disable-pywrap" ]; - nativeBuildInputs = [ pkg-config makeWrapper ] + nativeBuildInputs = [ pkg-config makeWrapper intltool ] # if python2 support is requested, it is needed at builtime as well as runtime. ++ lib.optionals (enablePython) [ python2 ] ; - buildInputs = [ perl nss nspr pam intltool ] + buildInputs = [ perl nss nspr pam ] ++ lib.optionals (enablePython) [ python2 ] ; propagatedBuildInputs = [ coreutils gettext cryptsetup lvm2 rsync keyutils which ]; diff --git a/pkgs/tools/security/fpm2/default.nix b/pkgs/tools/security/fpm2/default.nix index 15d5a5adcff..69e6c7f0281 100644 --- a/pkgs/tools/security/fpm2/default.nix +++ b/pkgs/tools/security/fpm2/default.nix @@ -11,8 +11,8 @@ stdenv.mkDerivation rec { sha256 = "1lfzja3vzd6l6hfvw8gvg4qkl5iy6gra5pa8gjlps9l63k2bjfhz"; }; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ gnupg gtk3 libxml2 intltool nettle ]; + nativeBuildInputs = [ pkg-config intltool ]; + buildInputs = [ gnupg gtk3 libxml2 nettle ]; meta = with lib; { description = "GTK2 port from Figaro's Password Manager originally developed by John Conneely, with some new enhancements"; diff --git a/pkgs/tools/security/gnupg-pkcs11-scd/default.nix b/pkgs/tools/security/gnupg-pkcs11-scd/default.nix index 1e46df40f85..22c11b3f2b1 100644 --- a/pkgs/tools/security/gnupg-pkcs11-scd/default.nix +++ b/pkgs/tools/security/gnupg-pkcs11-scd/default.nix @@ -10,7 +10,8 @@ stdenv.mkDerivation rec { sha256 = "sha256-Kb8p53gPkhxtOhH2COKwSDwbtRDFr6hHMJAkndV8Ukk="; }; - buildInputs = [ pkcs11helper pkg-config openssl ]; + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ pkcs11helper openssl ]; configureFlags = [ "--with-libgpg-error-prefix=${libgpg-error.dev}" diff --git a/pkgs/tools/security/metasploit/shell.nix b/pkgs/tools/security/metasploit/shell.nix index e4bae57b686..ccd510f63af 100644 --- a/pkgs/tools/security/metasploit/shell.nix +++ b/pkgs/tools/security/metasploit/shell.nix @@ -2,6 +2,7 @@ with import <nixpkgs> {}; stdenv.mkDerivation { name = "env"; + nativeBuildInputs = [ pkg-config ]; buildInputs = [ bundix git @@ -9,7 +10,6 @@ stdenv.mkDerivation { libpcap libxml2 libxslt - pkg-config postgresql ruby.devEnv sqlite diff --git a/pkgs/tools/security/onioncircuits/default.nix b/pkgs/tools/security/onioncircuits/default.nix index 329de10ff6b..249762781e7 100644 --- a/pkgs/tools/security/onioncircuits/default.nix +++ b/pkgs/tools/security/onioncircuits/default.nix @@ -11,7 +11,7 @@ python3.pkgs.buildPythonApplication rec { }; nativeBuildInputs = [ intltool ]; - buildInputs = [ intltool gtk3 gobject-introspection ]; + buildInputs = [ gtk3 gobject-introspection ]; propagatedBuildInputs = with python3.pkgs; [ stem distutils_extra pygobject3 ]; postFixup = '' diff --git a/pkgs/tools/security/tracee/default.nix b/pkgs/tools/security/tracee/default.nix index 48d102e619d..7d93e6d76f7 100644 --- a/pkgs/tools/security/tracee/default.nix +++ b/pkgs/tools/security/tracee/default.nix @@ -63,7 +63,7 @@ buildGoModule rec { buildPhase = '' runHook preBuild - make $makeFlags ''${enableParallelBuilding:+-j$NIX_BUILD_CORES -l$NIX_BUILD_CORES} + make $makeFlags ''${enableParallelBuilding:+-j$NIX_BUILD_CORES runHook postBuild ''; diff --git a/pkgs/tools/system/gdmap/default.nix b/pkgs/tools/system/gdmap/default.nix index 5fc242d533b..eedb0f07d13 100644 --- a/pkgs/tools/system/gdmap/default.nix +++ b/pkgs/tools/system/gdmap/default.nix @@ -9,8 +9,8 @@ stdenv.mkDerivation rec { sha256 = "0nr8l88cg19zj585hczj8v73yh21k7j13xivhlzl8jdk0j0cj052"; }; - nativeBuildInputs = [ pkg-config ]; - buildInputs = [ gtk2 libxml2 intltool gettext ]; + nativeBuildInputs = [ pkg-config intltool ]; + buildInputs = [ gtk2 libxml2 gettext ]; patches = [ ./get_sensitive.patch ./set_flags.patch ]; diff --git a/pkgs/tools/typesetting/asciidoc/default.nix b/pkgs/tools/typesetting/asciidoc/default.nix index cf6e0bdb3d4..4cfecfccdbc 100644 --- a/pkgs/tools/typesetting/asciidoc/default.nix +++ b/pkgs/tools/typesetting/asciidoc/default.nix @@ -218,7 +218,7 @@ in python3.pkgs.buildPythonApplication rec { # cannot find their neighbours (e.g. pdflatex doesn't find mktextfm). # We can remove PATH= when those impurities are fixed. # TODO: Is this still necessary when using texlive? - sed -e "s|^ENV =.*|ENV = dict(XML_CATALOG_FILES='${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml ${docbook_xsl_ns}/xml/xsl/docbook/catalog.xml ${docbook_xsl}/xml/xsl/docbook/catalog.xml', PATH='${lib.makeBinPath [ texlive coreutils gnused ]}')|" \ + sed -e "s|^ENV =.*|ENV = dict(XML_CATALOG_FILES='${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml ${docbook_xsl_ns}/xml/xsl/docbook/catalog.xml ${docbook_xsl}/xml/xsl/docbook/catalog.xml', PATH='${lib.makeBinPath [ texlive coreutils gnused ]}', **(dict(filter(lambda v: v[0] == 'SOURCE_DATE_EPOCH', os.environ.items()))))|" \ -e "s|^ASCIIDOC =.*|ASCIIDOC = '$out/bin/asciidoc'|" \ -e "s|^XSLTPROC =.*|XSLTPROC = '${libxslt.bin}/bin/xsltproc'|" \ -e "s|^DBLATEX =.*|DBLATEX = '${dblatexFull}/bin/dblatex'|" \ @@ -229,7 +229,7 @@ in python3.pkgs.buildPythonApplication rec { -e "s|^EPUBCHECK =.*|EPUBCHECK = '${epubcheck}/bin/epubcheck'|" \ -i asciidoc/a2x.py '' else '' - sed -e "s|^ENV =.*|ENV = dict(XML_CATALOG_FILES='${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml ${docbook_xsl_ns}/xml/xsl/docbook/catalog.xml ${docbook_xsl}/xml/xsl/docbook/catalog.xml')|" \ + sed -e "s|^ENV =.*|ENV = dict(XML_CATALOG_FILES='${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml ${docbook_xsl_ns}/xml/xsl/docbook/catalog.xml ${docbook_xsl}/xml/xsl/docbook/catalog.xml', **(dict(filter(lambda v: v[0] == 'SOURCE_DATE_EPOCH', os.environ.items()))))|" \ -e "s|^XSLTPROC =.*|XSLTPROC = '${libxslt.bin}/bin/xsltproc'|" \ -e "s|^XMLLINT =.*|XMLLINT = '${libxml2.bin}/bin/xmllint'|" \ -i asciidoc/a2x.py diff --git a/pkgs/tools/typesetting/tex/texlive/bin.nix b/pkgs/tools/typesetting/tex/texlive/bin.nix index 8da3df2773f..94ed0b87362 100644 --- a/pkgs/tools/typesetting/tex/texlive/bin.nix +++ b/pkgs/tools/typesetting/tex/texlive/bin.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, fetchpatch +{ lib, stdenv, fetchurl, fetchpatch, buildPackages , texlive , zlib, libiconv, libpng, libX11 , freetype, gd, libXaw, icu, ghostscript, libXpm, libXmu, libXext @@ -77,7 +77,13 @@ core = stdenv.mkDerivation rec { outputs = [ "out" "doc" ]; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ + pkg-config + ] ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ + # configure: error: tangle was not found but is required when cross-compiling. + texlive.bin.core + ]; + buildInputs = [ /*teckit*/ zziplib mpfr gmp pixman gd freetype libpng libpaper zlib @@ -94,7 +100,10 @@ core = stdenv.mkDerivation rec { ''; configureScript = "../configure"; + depsBuildBuild = [ buildPackages.stdenv.cc ]; + configureFlags = common.configureFlags + ++ lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "BUILDCC=${buildPackages.stdenv.cc.targetPrefix}cc" ] ++ [ "--without-x" ] # disable xdvik and xpdfopen ++ map (what: "--disable-${what}") [ "chktex" @@ -113,7 +122,7 @@ core = stdenv.mkDerivation rec { # TODO: perhaps improve texmf.cnf search locations postInstall = /* links format -> engine will be regenerated in texlive.combine */ '' - PATH="$out/bin:$PATH" ${texlinks}/bin/texlinks --cnffile "$out/share/texmf-dist/web2c/fmtutil.cnf" --unlink "$out/bin" + PATH="$out/bin:$PATH" ${buildPackages.texlive.bin.texlinks}/bin/texlinks --cnffile "$out/share/texmf-dist/web2c/fmtutil.cnf" --unlink "$out/bin" '' + /* a few texmf-dist files are useful; take the rest from pkgs */ '' mv "$out/share/texmf-dist/web2c/texmf.cnf" . rm -r "$out/share/texmf-dist" @@ -202,7 +211,7 @@ core-big = stdenv.mkDerivation { #TODO: upmendex if [[ "$path" =~ "libs/pplib" ]]; then # TODO: revert for texlive 2022 # ../../../texk/web2c/luatexdir/luamd5/md5lib.c:197:10: fatal error: 'utilsha.h' file not found - make ''${enableParallelBuilding:+-j''${NIX_BUILD_CORES} -l''${NIX_BUILD_CORES}} + make ''${enableParallelBuilding:+-j''${NIX_BUILD_CORES}} fi ) done |