-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(nix): add nix-shell support * chore(nix): update niv dependencies * chore(nix): update cargo dependencies * chore(web): update open-api
- Loading branch information
1 parent
3de66fc
commit 85c9b52
Showing
5 changed files
with
97 additions
and
71 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
let | ||
self = import ./. {}; | ||
inherit (self) sources pkgs meta; | ||
|
||
cargoDependencySetOfCrate = crate: [ crate ] ++ pkgs.lib.concatMap cargoDependencySetOfCrate (crate.dependencies ++ crate.buildDependencies); | ||
cargoDependencySet = pkgs.lib.unique (pkgs.lib.flatten (pkgs.lib.mapAttrsToList (crateName: crate: cargoDependencySetOfCrate crate.build) self.cargo.workspaceMembers)); | ||
in pkgs.mkShell rec { | ||
name = meta.operator.name; | ||
|
||
packages = with pkgs; [ | ||
## cargo et-al | ||
rustup # this breaks pkg-config if it is in the nativeBuildInputs | ||
|
||
## Extra dependencies for use in a pure env (nix-shell --pure) | ||
## These are mosuly useful for maintainers of this shell.nix | ||
## to ensure all the dependencies are caught. | ||
# cacert | ||
# vim nvim nano | ||
]; | ||
|
||
# derivation runtime dependencies | ||
buildInputs = pkgs.lib.concatMap (crate: crate.buildInputs) cargoDependencySet; | ||
|
||
# build time dependencies | ||
nativeBuildInputs = pkgs.lib.concatMap (crate: crate.nativeBuildInputs) cargoDependencySet ++ (with pkgs; [ | ||
clang | ||
git | ||
# Replace llvmPackages with llvmPackages_X, where X is the latest LLVM version (at the time of writing, 16) | ||
llvmPackages.bintools | ||
rustup | ||
|
||
# additions for this repo | ||
yarn | ||
typescript | ||
vite | ||
go | ||
]); | ||
|
||
LIBCLANG_PATH = "${pkgs.libclang.lib}/lib"; | ||
BINDGEN_EXTRA_CLANG_ARGS = "-I${pkgs.glibc.dev}/include -I${pkgs.clang}/resource-root/include"; | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.