anchor.diff: -{ boost
  +{ lib
  +, stdenv
  +, mkDerivation
   , fetchFromGitHub
  +, installShellFiles
  +, pkg-config
  +, qmake
  +, qttools
  +, boost
   , libGLU
  -, mkDerivation
   , muparser
  -, pkg-config
   , qtbase
  -, qmake
   , qtscript
   , qtsvg
   , qtxmlpatterns
  -, qttools
  -, lib
  -, installShellFiles
  +, qtmacextras
   }:
   
   mkDerivation rec {
     pname = "qcad";
  -  version = "3.26.4.10";
  +  version = "3.27.1.0";
   
     src = fetchFromGitHub {
       owner = "qcad";
       repo = "qcad";
       rev = "v${version}";
  -    sha256 = "sha256-dWpItV18lYjdwUsn2wwA//AUHU5ICGfmih2cJWihvn0=";
  +    sha256 = "sha256-tydgSfS1MF322sgWULMEZ8P6YIaN1QoeJiia0wbsgjo=";
     };
   
     patches = [
  
positive.code:     runHook postInstall
    '';
  
    buildInputs = [
      boost
      muparser
      libGLU
      qtbase
      qtscript
      qtsvg
      qtxmlpatterns
    ];
  
    nativeBuildInputs = [
      pkg-config
      qmake
      qttools
      installShellFiles
    ];
  
    meta = with lib; {
      description = "2D CAD package based on Qt";
      homepage = "https://qcad.org";
  
negative.code:     fi
    '';
  
    nativeBuildInputs = [
      installShellFiles
      pkg-config
      qmake
      qttools
    ];
  
    buildInputs = [
      boost
      libGLU
      muparser
      qtbase
      qtscript
      qtsvg
      qtxmlpatterns
    ] ++ lib.optionals stdenv.isDarwin [
      qtmacextras
    ];
  
    qmakeFlags = [
      "MUPARSER_DIR=${muparser}"
      "INSTALLROOT=$(out)"
      "BOOST_DIR=${boost.dev}"
    ];
  
    qtWrapperArgs =
      lib.optionals stdenv.isLinux [ "--prefix LD_LIBRARY_PATH : ${placeholder "out"}/lib" ]
      ++
      lib.optionals stdenv.isDarwin [ "--prefix DYLD_LIBRARY_PATH : ${placeholder "out"}/lib" ];
  
    installPhase = ''
      runHook preInstall
  
    '' + lib.optionalString stdenv.isLinux ''
      install -Dm555 release/qcad-bin $out/bin/qcad
    '' + lib.optionalString stdenv.isDarwin ''
      install -Dm555 release/QCAD.app/Contents/MacOS/QCAD $out/bin/qcad
      mkdir -p $out/lib
    '' +
    ''
      install -Dm555 -t $out/lib release/libspatialindexnavel${stdenv.hostPlatform.extensions.sharedLibrary}
      install -Dm555 -t $out/lib release/libqcadcore${stdenv.hostPlatform.extensions.sharedLibrary}
      install -Dm555 -t $out/lib release/libqcadentity${stdenv.hostPlatform.extensions.sharedLibrary}
      install -Dm555 -t $out/lib release/libqcadgrid${stdenv.hostPlatform.extensions.sharedLibrary}
      install -Dm555 -t $out/lib release/libqcadsnap${stdenv.hostPlatform.extensions.sharedLibrary}
      install -Dm555 -t $out/lib release/libqcadoperations${stdenv.hostPlatform.extensions.sharedLibrary}
      install -Dm555 -t $out/lib release/libqcadstemmer${stdenv.hostPlatform.extensions.sharedLibrary}
      install -Dm555 -t $out/lib release/libqcadspatialindex${stdenv.hostPlatform.extensions.sharedLibrary}
      install -Dm555 -t $out/lib release/libqcadgui${stdenv.hostPlatform.extensions.sharedLibrary}
      install -Dm555 -t $out/lib release/libqcadecmaapi${stdenv.hostPlatform.extensions.sharedLibrary}
  
      install -Dm444 -t $out/share/applications qcad.desktop
      install -Dm644 -t $out/share/pixmaps      scripts/qcad_icon.png
  