mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-16 05:20:22 +08:00
The Maturin-based wheel packaging was a historical remnant from when the local gateway launch path and OpenShell CLI were coupled in one binary. The gateway and CLI now ship as standalone artifacts, so the Python distribution should contain only the SDK. Build a single platform-independent setuptools wheel, verify that it cannot contain native code or an openshell entry point, and simplify the release jobs and documentation for SDK-only PyPI installs. Signed-off-by: Simon Scatton <sscatton@nvidia.com>
96 lines
2.7 KiB
Nix
96 lines
2.7 KiB
Nix
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
{
|
|
description = "OpenShell development environment";
|
|
|
|
nixConfig = {
|
|
extra-substituters = [ "https://openshell.cachix.org" ];
|
|
extra-trusted-public-keys = [
|
|
"openshell.cachix.org-1:OAr5MunsfH5PZvUsfD08OtGx5RtcwdNZGJdU5FqLm5w="
|
|
];
|
|
};
|
|
|
|
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) ];
|
|
};
|
|
commonDevShellPackages = with pkgs; [
|
|
# Assemble Debian artifacts on macOS and Linux.
|
|
dpkg
|
|
# Required to find packages.
|
|
pkg-config
|
|
# Coverage.
|
|
lcov
|
|
uv
|
|
];
|
|
treefmtEval = treefmt-nix.lib.evalModule pkgs {
|
|
projectRootFile = "flake.nix";
|
|
programs.nixfmt.enable = true;
|
|
};
|
|
rustToolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
|
z3-static = pkgs.callPackage ./nix/pkgs/z3-static.nix { };
|
|
aws-lc-static = pkgs.callPackage ./nix/pkgs/aws-lc-static.nix { };
|
|
testGuest = import ./nix/test-guest { inherit pkgs; };
|
|
in
|
|
{
|
|
apps.test-guest = testGuest.app;
|
|
apps.test-guest-cache = testGuest.cacheApp;
|
|
|
|
devShells = {
|
|
default =
|
|
(pkgs.mkShell.override {
|
|
stdenv =
|
|
if pkgs.stdenv.hostPlatform.isLinux then
|
|
pkgs.stdenvAdapters.useMoldLinker pkgs.stdenv
|
|
else
|
|
pkgs.stdenv;
|
|
})
|
|
{
|
|
packages = [
|
|
rustToolchain
|
|
z3-static
|
|
aws-lc-static
|
|
]
|
|
++ commonDevShellPackages;
|
|
};
|
|
}
|
|
// pkgs.lib.optionalAttrs pkgs.stdenv.hostPlatform.isLinux {
|
|
glibc-2-28 = import ./nix/devShells/glibc-2-28.nix {
|
|
inherit pkgs rust-overlay commonDevShellPackages;
|
|
};
|
|
musl = import ./nix/devShells/musl.nix {
|
|
inherit pkgs rust-overlay commonDevShellPackages;
|
|
};
|
|
};
|
|
|
|
formatter = treefmtEval.config.build.wrapper;
|
|
}
|
|
);
|
|
}
|