anchor.diff:  
     buildDirectly = shardsFile == null || crystalBinaries != { };
   
  +  mkCrystalBuildArgs = bin: attrs:
  +    lib.concatStringsSep " " ([
  +      "crystal"
  +      "build"
  +    ] ++ lib.optionals enableParallelBuilding [
  +      "--threads"
  +      "$NIX_BUILD_CORES"
  +    ] ++ [
  +      "-o"
  +      bin
  +      (attrs.src or (throw "No source file for crystal binary ${bin} provided"))
  +      (lib.concatStringsSep " " (attrs.options or defaultOptions))
  +    ]);
  +
   in
   stdenv.mkDerivation (mkDerivationArgs // {
   
  
positive.code:     "runHook preBuild"
    ] ++ lib.optional (format == "make")
      "make \${buildTargets:-build} $makeFlags"
    ++ lib.optionals (format == "crystal") (lib.mapAttrsToList
      (bin: attrs: ''
        crystal ${lib.escapeShellArgs ([
          "build"
          "-o"
          bin
          (attrs.src or (throw "No source file for crystal binary ${bin} provided"))
        ] ++ (attrs.options or defaultOptions))}
      '')
      crystalBinaries)
    ++ lib.optional (format == "shards")
      "shards build --local --production ${lib.concatStringsSep " " (args.options or defaultOptions)}"
    ++ [ "runHook postBuild" ]));
  
negative.code: 
    PREFIX = placeholder "out";
  
    inherit enableParallelBuilding;
    strictDeps = true;
    buildInputs = args.buildInputs or [ ] ++ [ crystal ];
  
  