mirror of
https://github.com/project-gauntlet/gauntlet.git
synced 2025-12-23 10:35:53 +00:00
We use crane to provide incremental caching to avoid unnecessary rebuilds. Because @project-gauntlet/tools is a git:// dependency in NPM, we must use fetchNpmDeps with a hash unique to package-lock.json. librusty_v8 builds quite slowly, so we fetch the binary bindings from the project's GitHub release and provide a .#fetch-rusty-v8-hashes package to get the correct hashes when v8 updates. The modules are quite basic for now, but once declarative configuration is supported in Gauntlet, these can be built out more. Also, we had to include a patch in Cargo.toml for libffi-sys because its crates.io release is outdated and breaks the nix sandbox.
13 lines
404 B
Nix
13 lines
404 B
Nix
(import (
|
|
let
|
|
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
|
nodeName = lock.nodes.root.inputs.flake-compat;
|
|
in
|
|
fetchTarball {
|
|
url =
|
|
lock.nodes.${nodeName}.locked.url
|
|
or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.${nodeName}.locked.rev}.tar.gz";
|
|
sha256 = lock.nodes.${nodeName}.locked.narHash;
|
|
}
|
|
) {src = ./.;})
|
|
.defaultNix
|