Add basic nix shell and direnv config (working on macOS) (#268)

* Add basic nix shell (working on macOS)

* Add direnv format
This commit is contained in:
Max Ammann 2023-04-08 17:28:28 -04:00 committed by GitHub
parent e390884221
commit 04eca4b196
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 0 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use nix

2
.gitignore vendored
View File

@ -28,3 +28,5 @@ perf.data*
*flamechart.svg
frame_*.png
.direnv/

31
shell.nix Normal file
View File

@ -0,0 +1,31 @@
# This nix-shell only supports macOS right now. Soon I will also add support for Linux
# The repository supports direnv (https://direnv.net/). If your IDE supports direnv,
# then you do not need to care about dependencies.
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
let
unstable = import
(builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/075dce259f6ced5cee1226dd76474d0674b54e64.tar.gz";
})
{ };
in
pkgs.mkShell {
nativeBuildInputs = [
# Tools
unstable.rustup
unstable.just
unstable.tracy
unstable.nixpkgs-fmt # To format this file: nixpkgs-fmt *.nix
# System dependencies
unstable.flatbuffers
unstable.protobuf
]
++ lib.optionals stdenv.isDarwin [
unstable.libiconv
pkgs.darwin.apple_sdk.frameworks.ApplicationServices
pkgs.darwin.apple_sdk.frameworks.CoreVideo
pkgs.darwin.apple_sdk.frameworks.AppKit
];
}