From 3f6c9bceac9b9770866bddbe45ae1e267e3dc123 Mon Sep 17 00:00:00 2001 From: Louis King Date: Sun, 14 Jun 2026 20:27:52 +0100 Subject: [PATCH] Added nix-shell support --- .envrc | 3 +++ .gitignore | 4 +++- shell.nix | 10 ++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .envrc create mode 100644 shell.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..a195da8 --- /dev/null +++ b/.envrc @@ -0,0 +1,3 @@ +if has nix && declare -F use_nix >/dev/null; then + use nix +fi diff --git a/.gitignore b/.gitignore index aa2a958..e042944 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,9 @@ /backup/ /content/ +# Direnv +.direnv + # Byte-compiled / optimized / DLL files __pycache__/ *.py[codz] @@ -148,7 +151,6 @@ celerybeat.pid # Environments .env .env.backup -.envrc .venv env/ venv/ diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..3ee09ab --- /dev/null +++ b/shell.nix @@ -0,0 +1,10 @@ +with import {}; +mkShell { + NIX_LD_LIBRARY_PATH = lib.makeLibraryPath [ + stdenv.cc.cc + ]; + NIX_LD = lib.fileContents "${stdenv.cc}/nix-support/dynamic-linker"; + shellHook = '' + export LD_LIBRARY_PATH=$NIX_LD_LIBRARY_PATH + ''; +}