Change:
Describe the bug After switching my NixOS configuration to use the rebuild failed at rebuilding . Trying to rebuild again (continuing at again) caused the same issue. Tried after setting in my local nixpkgs clone, and that has worked without errors. I've uploaded the log of to . ~The has triggered a rebuild of other packages so I don't have a failing log available (yet).~ EDIT: gist updated with nixos-rebuild log. Looks like there is a difference / error in the detection. has been able to reproduce this (non-deterministically), so I'm curious what his easy reproducer is. To Reproduce Steps to reproduce the behavior: reproducer TBD Expected behavior Package should build. Additional context Add any other context about the problem here. Metadata Maintainer information:
This issue has been mentioned on NixOS Discourse. There might be relevant details there:
I’m not sure of why exactly this causes the subsequent errors, but is a direct consequence of . My reproducer is simply (where the flake is with ). The reason why it wasn’t deterministic for me is that the second machine in which I tried to build it had the first one as a substituter, so the derivation hadn’t been built locally but had been fetched − and as such wasn’t affected by NixOS/nix .
Didn't realize there was a targeted fix in the nix repo yet, but I've attempted to rebuild my system again with and without any substituters. Took about 36h, but rebuilding the world worked this time.

Discussion:
<del> { stdenv, fetchurl, pidgin, imagemagick, ghostscript , pkgconfig, glib, gtk, texLive }: </del> <ins> { stdenv, fetchurl, pkgconfig, pidgin, texLive, imagemagick, glib, gtk }: let version = "1.5.0"; in </ins> stdenv.mkDerivation { <del> name = "pidgin-latex"; </del> <ins> name = "pidgin-latex-${version}"; </ins> src = fetchurl { <del> url = http://tapas.affenbande.org/pidgin-latex/pidgin-latex-0.9.tgz; sha256 = "1yqd3qgxd3n8hm60qg7yv7j1crr6f3d4yrdpgwdpw2pyf92p8nxp"; </del> <ins> url = "mirror://sourceforge/pidgin-latex/pidgin-latex_${version}.tar.bz2"; sha256 = "9c850aee90d7e59de834f83e09fa6e3e51b123f06e265ead70957608ada95441"; </ins> }; <del> preBuild = '' sed -e '/^PREFIX/d' -i Makefile ; sed -e 's@/usr/bin/latex@${texLive}/bin/pdflatex@g' -i pidgin-latex.h sed -e 's@/usr/bin/convert@${imagemagick}/bin/convert@g' -i pidgin-latex.h sed -e 's@.*convert_path.*@const gchar *convert = CONVERT_PATH;@' sed -e 's@.*latex_path.*@const gchar *convert = LATEX_PATH;@' sed -e 's/%s.dvi/%s.pdf/' -i pidgin-latex.c sed -e 's/latex_system(.*)FALSE/latex_system1TRUE/' -i pidgin-latex.c ''; makeFlags = "PREFIX=$(out)"; </del> <ins> nativeBuildInputs = [pkgconfig]; buildInputs = [gtk glib pidgin]; makeFlags = "PREFIX=$(out)"; </ins> <del> preInstall = "mkdir -p $out/lib/pidgin $out/bin"; postInstall = '' mkdir -p $out/share/pidgin-latex ln -s $out/lib/pidgin/pidgin-latex.so $out/share/pidgin-latex/ </del> <ins> postPatch = '' sed -e 's/-Wl,-soname//' -i Makefile </ins> ''; <del> buildInputs = [pidgin imagemagick ghostscript pkgconfig glib gtk texLive]; </del> <ins> passthru = { wrapArgs = "--prefix PATH ':' ${texLive}/bin:${imagemagick}/bin"; }; </ins> <del> meta = { longDescription = '' Pidgin-LaTeX is a pidgin plugin that cuts everything inside $$ .. $$ and feeds to LaTeX. A bit of conversion (automated, of course) - and you see every formula that occurs in conversation in pretty graphical form.  There are some glitches - when a formula fails to compile, you can see just previous formula.. Enable it for user by linking to ~/.purple/plugins - from sw/share/pidgin-latex , not from store of course. ''; homepage = http://tapas.affenbande.org/wordpress/?page_id=70; </del> <ins> meta = with stdenv.lib; { homepage = http://sourceforge.net/projects/pidgin-latex/; description = "LaTeX rendering plugin for Pidgin IM"; licenses = licenses.gpl2; platforms = platforms.linux; maintainers = maintainers.abbradar; </ins> }; }

<del> args : with args; let version = "1.5.0"; in rec { src = fetchurl { url = "mirror://sourceforge/pidgin-latex/pidgin-latex_${version}.tar.bz2"; sha256 = "9c850aee90d7e59de834f83e09fa6e3e51b123f06e265ead70957608ada95441"; }; buildInputs = [texLive pkgconfig gtk imagemagick glib pidgin which]; configureFlags = []; installFlags = [ "PREFIX=$out" ]; preBuild = fullDepEntry ('' mkdir -p $out/bin ln -s $(which convert) $out/bin ln -s $(which xelatex) $out/bin ln -s $(which dvips) $out/bin sed -e 's/-Wl,-soname//' -i Makefile sed -e 's/(PATH(")latex/1xelatex/' -i LaTeX.c sed -e 's/|| execute(cmddvips, dvipsopts, 10) //' -i LaTeX.c sed -e 's/  strcat([*]file_ps, "[.]ps");/  strcat(*file_ps, ".pdf");/' -i LaTeX.c sed -e 's/([*]convertopts[5]=[{]")("",)/1 -trim 2/' -i LaTeX.c sed -e 's/(#define HEADER ".*)12pt(.*)"/116pt2usepackage{fontspec}usepackage{xunicode}"/' -i LaTeX.h '') ["minInit" "addInputs" "defEnsureDir" "doUnpack"]; postInstall = fullDepEntry ('' mkdir -p $out/lib mkdir -p $out/share/pidgin-latex ln -s ../../lib/pidgin/LaTeX.so  $out/share/pidgin-latex '') ["minInit" "defEnsureDir" "doMakeInstall"]; /* doConfigure should be specified separately */ phaseNames = [ "preBuild" "doMakeInstall" "postInstall"]; name = "pidgin-latex-${version}"; meta = { description = "LaTeX rendering plugin for Pidgin IM"; priority = "10"; }; } </del>

{ stdenv, buildEnv, pidgin, makeWrapper, plugins }: <del> let drv = buildEnv { </del> <ins> let extraArgs = map (x: x.wrapArgs or "") plugins; drv = buildEnv { </ins> name = "pidgin-with-plugins-" + (builtins.parseDrvName pidgin.name).version; paths = [ pidgin ] ++ plugins;

done fi wrapProgram $out/bin/pidgin  <del> --suffix-each PURPLE_PLUGIN_PATH ':' "$out/lib/purple-${pidgin.version} $out/lib/pidgin" </del> <ins> --suffix-each PURPLE_PLUGIN_PATH ':' "$out/lib/purple-${pidgin.version} $out/lib/pidgin"  ${toString extraArgs} </ins> ''; }; in stdenv.lib.overrideDerivation drv (x : { buildInputs = x.buildInputs ++ [ makeWrapper ]; })

plugins = []; }; <del> pidginlatex = callPackage ../applications/networking/instant-messengers/pidgin-plugins/pidgin-latex { imagemagick = imagemagickBig; }; </del> <ins> pidginlatex = callPackage ../applications/networking/instant-messengers/pidgin-plugins/pidgin-latex { }; </ins> <del> pidginlatexSF = builderDefsPackage (import ../applications/networking/instant-messengers/pidgin-plugins/pidgin-latex/pidgin-latex-sf.nix) { inherit pkgconfig pidgin texLive imagemagick which glib gtk; }; </del> <ins> pidginlatexSF = pidginlatex; </ins> pidginmsnpecan = callPackage ../applications/networking/instant-messengers/pidgin-plugins/msn-pecan { };