Skip to content

Commit

Permalink
Add basic nix shell and direnv config (working on macOS) (#268)
Browse files Browse the repository at this point in the history
* Add basic nix shell (working on macOS)

* Add direnv format
  • Loading branch information
maxammann committed Apr 8, 2023
1 parent e390884 commit 04eca4b
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use nix
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ perf.data*
*flamechart.svg

frame_*.png

.direnv/
31 changes: 31 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -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
];
}

0 comments on commit 04eca4b

Please sign in to comment.