-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nix-flake: Add shell definition (#954)
Initialized flake file and added development shell definition. Exporting of default compiler flags is moved to makefile. Referenced issue: #940 Signed-off-by: markoburcul <[email protected]>
- Loading branch information
1 parent
8625705
commit 2151e02
Showing
3 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
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,35 @@ | ||
{ | ||
description = "Codex build flake"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; | ||
}; | ||
|
||
outputs = { self, nixpkgs }: | ||
let | ||
supportedSystems = [ | ||
"x86_64-linux" "aarch64-linux" | ||
"x86_64-darwin" "aarch64-darwin" | ||
]; | ||
forAllSystems = f: nixpkgs.lib.genAttrs supportedSystems (system: f system); | ||
pkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); | ||
in rec { | ||
devShells = forAllSystems (system: let | ||
pkgs = pkgsFor.${system}; | ||
inherit (pkgs) lib stdenv mkShell; | ||
in { | ||
default = mkShell.override { stdenv = pkgs.gcc11Stdenv; } { | ||
buildInputs = with pkgs; [ | ||
# General | ||
git pkg-config openssl lsb-release | ||
# Build | ||
rustc cargo nimble gcc11 cmake nim-unwrapped-1 | ||
# Libraries | ||
gmp llvmPackages.openmp | ||
# Tests | ||
nodejs_18 | ||
]; | ||
}; | ||
}); | ||
}; | ||
} |