Use LLVM-based stdenv for Nix build/shell (#5155)

This commit is contained in:
Alexandru Ionut Tripon 2026-03-13 21:08:08 +00:00 committed by GitHub
commit 14da23b06f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -86,6 +86,7 @@
let
pkgs = nixpkgsFor.${system};
llvm = pkgs.llvmPackages_19;
mkShell = pkgs.mkShell.override { inherit (llvm) stdenv; };
packages' = self.packages.${system};
@ -131,7 +132,7 @@
in
{
default = pkgs.mkShell {
default = mkShell {
name = "prism-launcher";
inputsFrom = [ packages'.prismlauncher-unwrapped ];
@ -139,10 +140,11 @@
packages = with pkgs; [
ccache
llvm.clang-tools
python3 # Required for `run-clang-tidy`, etc.
];
cmakeBuildType = "Debug";
cmakeFlags = [ "-GNinja" ] ++ packages'.prismlauncher.cmakeFlags;
cmakeFlags = [ "-GNinja" ] ++ packages'.prismlauncher-unwrapped.cmakeFlags;
dontFixCmake = true;
shellHook = ''
@ -165,16 +167,24 @@
formatter = forAllSystems (system: nixpkgsFor.${system}.nixfmt-rfc-style);
overlays.default = final: prev: {
prismlauncher-unwrapped = prev.callPackage ./nix/unwrapped.nix {
inherit
libnbtplusplus
self
;
};
overlays.default =
final: prev:
prismlauncher = final.callPackage ./nix/wrapper.nix { };
};
let
llvm = final.llvmPackages_19 or prev.llvmPackages_19;
in
{
prismlauncher-unwrapped = prev.callPackage ./nix/unwrapped.nix {
inherit (llvm) stdenv;
inherit
libnbtplusplus
self
;
};
prismlauncher = final.callPackage ./nix/wrapper.nix { };
};
packages = forAllSystems (
system: