Add direnv and better support for Darwin

This commit is contained in:
Campbell Alden 2023-07-11 17:12:55 +09:00
parent 6ecc159b0c
commit c18cec94a1
2 changed files with 17 additions and 0 deletions

9
.envrc Normal file
View file

@ -0,0 +1,9 @@
#!/usr/bin/env bash
# the shebang is ignored, but nice for editors
if type -P lorri &>/dev/null; then
eval "$(lorri direnv)"
else
echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]'
use nix
fi

8
shell.nix Normal file
View file

@ -0,0 +1,8 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = [
pkgs.rustc
pkgs.cargo
] ++ [ pkgs.libiconv pkgs.darwin.apple_sdk.frameworks.CoreServices ];
}