mirror of
https://github.com/Dillonb/n64.git
synced 2024-06-01 02:37:41 -04:00
add direnv config and shell.nix
This commit is contained in:
parent
1e461dc014
commit
6e40a93ea1
9
.envrc
Normal file
9
.envrc
Normal 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
|
34
shell.nix
Normal file
34
shell.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ pkgs ? import <nixpkgs> {} }:
|
||||
|
||||
let llvmPackage = pkgs.llvmPackages_17;
|
||||
stdenv = llvmPackage.libcxxStdenv;
|
||||
libcxx = llvmPackage.libraries.libcxx;
|
||||
libcxxabi = llvmPackage.libraries.libcxxabi;
|
||||
|
||||
buildInputs = [
|
||||
pkgs.hello
|
||||
pkgs.cmake
|
||||
llvmPackage.libcxxClang
|
||||
pkgs.SDL2
|
||||
pkgs.capstone
|
||||
pkgs.ninja
|
||||
pkgs.shaderc
|
||||
pkgs.pkg-config
|
||||
pkgs.dbus
|
||||
pkgs.bzip2
|
||||
pkgs.gdb
|
||||
pkgs.vulkan-loader
|
||||
stdenv
|
||||
libcxx
|
||||
libcxxabi
|
||||
];
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = buildInputs;
|
||||
shellHook = ''
|
||||
export CPATH=$CPATH:${libcxx.dev}/include/c++/v1
|
||||
export CPLUS_INCLUDE_PATH=$CPATH
|
||||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${libcxx}/lib:${libcxxabi}/lib
|
||||
'';
|
||||
CPATH = pkgs.lib.makeSearchPathOutput "dev" "include" (buildInputs);
|
||||
}
|
Loading…
Reference in a new issue