-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
97 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use nix; |
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,50 @@ | ||
scope@{ pkgs ? import <nixpkgs> { } }: | ||
|
||
let locale = "en_US.UTF8"; | ||
in with pkgs; | ||
buildEnv { | ||
name = "mnemos-env"; | ||
paths = with pkgs; | ||
[ | ||
git | ||
bash | ||
direnv | ||
binutils | ||
stdenv | ||
bashInteractive | ||
docker | ||
cacert | ||
gcc | ||
openssl | ||
shellcheck | ||
(glibcLocales.override { locales = [ locale ]; }) | ||
] ++ lib.optional stdenv.isDarwin [ Security libiconv ]; | ||
|
||
nativeBuildInputs = [ pkg-config cmake rustup ]; | ||
buildInputs = [ | ||
clang | ||
libclang | ||
systemd | ||
udev | ||
SDL2 | ||
SDL2.dev | ||
# other stuff | ||
bash | ||
]; | ||
passthru = with pkgs; { | ||
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; | ||
GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt"; | ||
CURL_CA_BUNDLE = "${cacert}/etc/ca-bundle.crt"; | ||
|
||
CARGO_TERM_COLOR = "always"; | ||
RUST_BACKTRACE = "true"; | ||
|
||
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; | ||
|
||
OPENSSL_DIR = "${openssl.dev}"; | ||
OPENSSL_LIB_DIR = "${openssl.out}/lib"; | ||
|
||
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}"; | ||
|
||
}; | ||
} |
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,46 @@ | ||
scope@{ pkgs ? import <nixpkgs> { } }: | ||
with pkgs; | ||
let | ||
mnemos = import ./default.nix { inherit pkgs; }; | ||
|
||
env = buildEnv { | ||
name = "mnemos-env"; | ||
paths = [ ] ++ lib.optional stdenv.isDarwin libiconv ++ mnemos.buildInputs | ||
++ mnemos.nativeBuildInputs; | ||
}; | ||
in mkShell { | ||
nativeBuildInputs = [ pkg-config ]; | ||
buildInputs = [ | ||
clang | ||
libclang | ||
systemd | ||
udev | ||
# for melpomene | ||
SDL2 | ||
SDL2.dev | ||
]; | ||
packages = [ | ||
# devtools | ||
just | ||
cargo-nextest | ||
direnv | ||
# rust esp32 tools | ||
cargo-espflash | ||
cargo-espmonitor | ||
# for testing the x86_64 kernel | ||
qemu | ||
]; | ||
|
||
PROTOC = "${protobuf}/bin/protoc"; | ||
PROTOC_INCLUDE = "${protobuf}/include"; | ||
|
||
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt"; | ||
GIT_SSL_CAINFO = "${cacert}/etc/ssl/certs/ca-bundle.crt"; | ||
CURL_CA_BUNDLE = "${cacert}/etc/ca-bundle.crt"; | ||
CARGO_TERM_COLOR = "always"; | ||
|
||
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; | ||
|
||
OPENSSL_DIR = "${openssl.dev}"; | ||
OPENSSL_LIB_DIR = "${openssl.out}/lib"; | ||
} |