Skip to content

Commit

Permalink
Merge pull request #9613 from jlesquembre/jl/clang-stdenv
Browse files Browse the repository at this point in the history
Fix clang devshell
  • Loading branch information
Ericson2314 authored Dec 15, 2023
2 parents 071dbbe + 66d37b7 commit 419a64f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@
stdenvs)));

devShells = let
makeShell = pkgs: stdenv: (pkgs.nix.override { inherit stdenv; }).overrideAttrs (_: {
makeShell = pkgs: stdenv: (pkgs.nix.override { inherit stdenv; }).overrideAttrs (attrs: {
installFlags = "sysconfdir=$(out)/etc";
shellHook = ''
PATH=$prefix/bin:$PATH
Expand All @@ -405,6 +405,9 @@
# Make bash completion work.
XDG_DATA_DIRS+=:$out/share
'';
nativeBuildInputs = attrs.nativeBuildInputs or []
++ lib.optional stdenv.cc.isClang pkgs.buildPackages.bear
++ lib.optional (stdenv.cc.isClang && stdenv.hostPlatform == stdenv.buildPlatform) pkgs.buildPackages.clang-tools;
});
in
forAllSystems (system:
Expand Down

0 comments on commit 419a64f

Please sign in to comment.