mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-15 05:09:44 +08:00
71 lines
1.9 KiB
Nix
71 lines
1.9 KiB
Nix
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
{
|
|
description = "OpenShell development environment";
|
|
|
|
inputs = {
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
rust-overlay = {
|
|
url = "github:oxalica/rust-overlay";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
treefmt-nix = {
|
|
url = "github:numtide/treefmt-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
flake-utils,
|
|
nixpkgs,
|
|
treefmt-nix,
|
|
rust-overlay,
|
|
...
|
|
}:
|
|
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" "aarch64-darwin" ] (
|
|
system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
overlays = [ (import rust-overlay) ];
|
|
};
|
|
treefmtEval = treefmt-nix.lib.evalModule pkgs {
|
|
projectRootFile = "flake.nix";
|
|
programs.nixfmt.enable = true;
|
|
};
|
|
rustToolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
|
testGuest = import ./nix/test-guest { inherit pkgs; };
|
|
in
|
|
{
|
|
apps.test-guest = testGuest.app;
|
|
apps.test-guest-cache = testGuest.cacheApp;
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
packages = with pkgs; [
|
|
rustToolchain
|
|
# Assemble Debian artifacts on macOS and Linux.
|
|
dpkg
|
|
# Required to find packages
|
|
pkg-config
|
|
# Required for bindgen generation.
|
|
llvmPackages.libclang
|
|
# system dependency for openshell-prover
|
|
z3
|
|
# Coverage
|
|
lcov
|
|
];
|
|
|
|
env = {
|
|
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
|
|
};
|
|
};
|
|
|
|
formatter = treefmtEval.config.build.wrapper;
|
|
}
|
|
);
|
|
}
|