singularity-forge/flake.nix

48 lines
1.2 KiB
Nix
Raw Permalink Normal View History

2026-04-15 13:38:15 +02:00
{
description = "Development and build environment for singularity-forge";
2026-04-15 13:38:15 +02:00
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
in
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [
bash
bun
cargo
clippy
2026-04-15 13:38:15 +02:00
git
nodejs_24
rust-analyzer
rustc
rustfmt
uv
2026-04-15 13:38:15 +02:00
];
shellHook = ''
export SF_SOURCE_DIR="${toString ./.}"
export PATH="$SF_SOURCE_DIR/bin:$PATH"
export RUST_BACKTRACE=1
2026-04-15 13:38:15 +02:00
echo "singularity-forge development shell"
echo " bun : $(command -v bun)"
echo " cargo: $(command -v cargo)"
echo " node : $(command -v node)"
echo " rustc: $(command -v rustc)"
echo ""
echo "Build native addon:"
echo " bun run --filter @singularity-forge/native build:native"
2026-04-15 13:38:15 +02:00
'';
};
});
}