anchor.diff:    src = fetchFromGitHub {
       owner = "prusa3d";
       repo = "Slic3r";
  -    sha256 = "022mdz8824wg68qwgd49gnplw7wn84hqw113xh8l25v3j1jb9zmc";
  +    sha256 = "1al60hrqbhl05dnsr99hzbmxmn26fyx19sc5zxv816x3q6px9n2d";
       rev = "version_${version}";
     };
   
  
positive.code:     XMLSAX
    ]);
  
    prePatch = ''
      # In nix ioctls.h isn't available from the standard kernel-headers package
      # on other distributions. As the copy in glibc seems to be identical to the
      # one in the kernel, we use that one instead.
      sed -i 's|"/usr/include/asm-generic/ioctls.h"|<asm-generic/ioctls.h>|g' xs/src/libslic3r/GCodeSender.cpp
  
      # PERL_VENDORARCH and PERL_VENDORLIB aren't detected correctly by the build
      # system, so we have to override them. Setting them as environment variables
      # doesn't work though, so patching the paths directly in the CMakeLists.txt
      # seems to be the easisest way.
      sed -i "s|\''${PERL_VENDORARCH}|$out/lib/slic3r-prusa3d|g" xs/CMakeLists.txt
      sed -i "s|\''${PERL_VENDORLIB}|$out/lib/slic3r-prusa3d|g" xs/CMakeLists.txt
    '';
  
negative.code: { stdenv, fetchFromGitHub, makeWrapper, which, cmake, perl, perlPackages,
    boost, tbb, wxGTK30, pkgconfig, gtk3, fetchurl, gtk2, libGLU,
    glew, eigen, curl, gtest, nlopt, pcre, xorg }:
  let
    AlienWxWidgets = perlPackages.buildPerlPackage rec {
      name = "Alien-wxWidgets-0.69";
  