mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 01:54:20 +03:00
Use LLVM-based stdenv for Nix build/shell (#5155)
This commit is contained in:
commit
14da23b06f
1 changed files with 21 additions and 11 deletions
32
flake.nix
32
flake.nix
|
|
@ -86,6 +86,7 @@
|
||||||
let
|
let
|
||||||
pkgs = nixpkgsFor.${system};
|
pkgs = nixpkgsFor.${system};
|
||||||
llvm = pkgs.llvmPackages_19;
|
llvm = pkgs.llvmPackages_19;
|
||||||
|
mkShell = pkgs.mkShell.override { inherit (llvm) stdenv; };
|
||||||
|
|
||||||
packages' = self.packages.${system};
|
packages' = self.packages.${system};
|
||||||
|
|
||||||
|
|
@ -131,7 +132,7 @@
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
default = pkgs.mkShell {
|
default = mkShell {
|
||||||
name = "prism-launcher";
|
name = "prism-launcher";
|
||||||
|
|
||||||
inputsFrom = [ packages'.prismlauncher-unwrapped ];
|
inputsFrom = [ packages'.prismlauncher-unwrapped ];
|
||||||
|
|
@ -139,10 +140,11 @@
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
ccache
|
ccache
|
||||||
llvm.clang-tools
|
llvm.clang-tools
|
||||||
|
python3 # Required for `run-clang-tidy`, etc.
|
||||||
];
|
];
|
||||||
|
|
||||||
cmakeBuildType = "Debug";
|
cmakeBuildType = "Debug";
|
||||||
cmakeFlags = [ "-GNinja" ] ++ packages'.prismlauncher.cmakeFlags;
|
cmakeFlags = [ "-GNinja" ] ++ packages'.prismlauncher-unwrapped.cmakeFlags;
|
||||||
dontFixCmake = true;
|
dontFixCmake = true;
|
||||||
|
|
||||||
shellHook = ''
|
shellHook = ''
|
||||||
|
|
@ -165,16 +167,24 @@
|
||||||
|
|
||||||
formatter = forAllSystems (system: nixpkgsFor.${system}.nixfmt-rfc-style);
|
formatter = forAllSystems (system: nixpkgsFor.${system}.nixfmt-rfc-style);
|
||||||
|
|
||||||
overlays.default = final: prev: {
|
overlays.default =
|
||||||
prismlauncher-unwrapped = prev.callPackage ./nix/unwrapped.nix {
|
final: prev:
|
||||||
inherit
|
|
||||||
libnbtplusplus
|
|
||||||
self
|
|
||||||
;
|
|
||||||
};
|
|
||||||
|
|
||||||
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 (
|
packages = forAllSystems (
|
||||||
system:
|
system:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue