diff --git a/.vscode/settings.json b/.vscode/settings.json index 186d12056..c557a1507 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -7,5 +7,6 @@ "rust-analyzer.diagnostics.disabled": [ "mismatched-arg-count" ], - "rust-analyzer.check.command": "clippy" + "rust-analyzer.check.command": "clippy", + "nixEnvSelector.nixFile": "${workspaceRoot}/shell.nix" } \ No newline at end of file diff --git a/shell.nix b/shell.nix new file mode 100644 index 000000000..61d4ed176 --- /dev/null +++ b/shell.nix @@ -0,0 +1,22 @@ +# Defines an environment for `nix-shell` for developing Fornjot on NixOS. +# +# This is not complete, and probably not the correct NixOS way to do it either. +# It's just what works for me (@hannobraun) in combination with my local +# environment. Pull requests to improve this (best coupled with thorough +# explanations, because I understand very little about Nix/NixOS) welcome! + +{ pkgs ? import { } }: + +pkgs.mkShell { + packages = with pkgs; [ + # Used as a local build tool. + just + + # Required by dependencies. + openssl + pkg-config + ]; + + # Otherwise `export-validator` produces an error trying to link `libstdc++`. + LD_LIBRARY_PATH = "${pkgs.stdenv.cc.cc.lib}/lib"; +}