git.delta.rocks / jrsonnet / refs/commits / be1ca0e13d7d

difftreelog

source

nix/jrsonnet.nix1.0 KiBsourcehistory
1{ lib2, fetchFromGitHub3, rustPlatform4, runCommand5, makeWrapper6, withNightlyFeatures ? false7}:89with lib;1011let12  filteredSrc = builtins.path {13    name = "jrsonnet-src-filtered";14    filter = path: type: !(builtins.baseNameOf path == "flake.nix" || builtins.baseNameOf path == "nix");15    path = ../.;16  };1718  # for some reason, filteredSrc hash still depends on nix directory contents19  # Moving it into a CA store drops leftover references20  src = runCommand "jrsonnet-src"21    {22      __contentAddressed = true;23    } "cp -r '${filteredSrc}' $out";24in2526rustPlatform.buildRustPackage rec {27  inherit src;28  pname = "jrsonnet";29  version = "current${optionalString withNightlyFeatures "-nightly"}";3031  cargoTestFlags = [32    "--features=mimalloc,legacy-this-file${optionalString withNightlyFeatures ",nightly"}"33  ];34  cargoBuildFlags = cargoTestFlags;3536  nativeBuildInputs = [ makeWrapper ];3738  postInstall = ''39    wrapProgram $out/bin/jrsonnet --add-flags "--max-stack=200000 --os-stack=200000"40  '';4142  cargoLock = {43    lockFile = ../Cargo.lock;44  };45}