Skip to content

Commit

Permalink
Merge pull request #2105 from hannobraun/nix
Browse files Browse the repository at this point in the history
Add configuration for developing on NixOS
  • Loading branch information
hannobraun authored Nov 22, 2023
2 parents 9704e2d + 686f205 commit 0eb3915
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
22 changes: 22 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -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 <nixpkgs> { } }:

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";
}

0 comments on commit 0eb3915

Please sign in to comment.