Skip to content

Commit 8d9ca35

Browse files
chore(flake): fix flake.nix (#492)
## What kind of change does this PR introduce? Chore: fixes some issues with the project's flake.nix file. ## What is the current behavior? Compilation fails on the shell produced by the flake. ## What is the new behavior? Compilation works as intended. ## Additional context Closes #481. I suspect that some settings may not be necessary, but I'd rather be conservative and not remove anything just yet. Co-authored-by: Julian Domke <68325451+juleswritescode@users.noreply.github.com>
1 parent 9432c1d commit 8d9ca35

File tree

1 file changed

+28
-14
lines changed

1 file changed

+28
-14
lines changed

flake.nix

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,15 @@
1010
};
1111
};
1212

13-
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
14-
flake-utils.lib.eachDefaultSystem (system:
13+
outputs =
14+
{
15+
self,
16+
nixpkgs,
17+
flake-utils,
18+
rust-overlay,
19+
}:
20+
flake-utils.lib.eachDefaultSystem (
21+
system:
1522
let
1623
overlays = [ (import rust-overlay) ];
1724
pkgs = import nixpkgs {
@@ -25,43 +32,49 @@
2532
buildInputs = with pkgs; [
2633
# Rust toolchain
2734
rustToolchain
28-
35+
2936
# Node.js ecosystem
3037
bun
3138
nodejs_20
32-
39+
3340
# Python for additional tooling
3441
python3
3542
python3Packages.pip
36-
43+
3744
# System dependencies
3845
pkg-config
3946
openssl
40-
47+
4148
# Build tools
4249
just
4350
git
44-
51+
52+
# Docker
53+
docker-compose
54+
4555
# LSP and development tools
4656
rust-analyzer
47-
57+
4858
# Additional tools that might be needed
4959
cmake
5060
gcc
5161
libiconv
62+
llvmPackages.clang
63+
llvmPackages.libclang
5264
];
53-
65+
5466
# Environment variables
5567
env = {
5668
RUST_SRC_PATH = "${rustToolchain}/lib/rustlib/src/rust/library";
5769
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
70+
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
5871
};
5972

6073
in
6174
{
6275
devShells.default = pkgs.mkShell {
6376
inherit buildInputs;
64-
77+
hardeningDisable = [ "fortify" ];
6578
shellHook = ''
6679
echo "PostgreSQL Language Server Development Environment"
6780
echo "Available tools:"
@@ -78,15 +91,16 @@
7891
echo "Use Docker for database:"
7992
echo " • docker-compose up -d"
8093
echo ""
81-
94+
8295
# Set environment variables
83-
${pkgs.lib.concatStringsSep "\n"
84-
(pkgs.lib.mapAttrsToList (name: value: "export ${name}=\"${value}\"") env)}
96+
${pkgs.lib.concatStringsSep "\n" (
97+
pkgs.lib.mapAttrsToList (name: value: "export ${name}=\"${value}\"") env
98+
)}
8599
'';
86100
};
87101

88102
# Formatter for nix files
89103
formatter = pkgs.nixfmt-rfc-style;
90104
}
91105
);
92-
}
106+
}

0 commit comments

Comments
 (0)