chore(nix): nixfmt
This commit is contained in:
parent
6ec444e0c4
commit
6b6da03aa4
27
flake.nix
27
flake.nix
@ -39,13 +39,15 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
libnbtplusplus,
|
||||
nix-filter,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
|
||||
# While we only officially support aarch and x86_64 on Linux and MacOS,
|
||||
@ -55,18 +57,22 @@
|
||||
|
||||
forAllSystems = lib.genAttrs systems;
|
||||
nixpkgsFor = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
||||
in {
|
||||
in
|
||||
{
|
||||
checks = forAllSystems (
|
||||
system: let
|
||||
system:
|
||||
let
|
||||
checks' = nixpkgsFor.${system}.callPackage ./nix/checks.nix { inherit self; };
|
||||
in
|
||||
lib.filterAttrs (_: lib.isDerivation) checks'
|
||||
);
|
||||
|
||||
devShells = forAllSystems (
|
||||
system: let
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgsFor.${system};
|
||||
in {
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
inputsFrom = [ self.packages.${system}.shatteredprism-unwrapped ];
|
||||
buildInputs = with pkgs; [
|
||||
@ -92,7 +98,8 @@
|
||||
};
|
||||
|
||||
packages = forAllSystems (
|
||||
system: let
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgsFor.${system};
|
||||
|
||||
# Build a scope from our overlay
|
||||
@ -110,10 +117,12 @@
|
||||
|
||||
# We put these under legacyPackages as they are meant for CI, not end user consumption
|
||||
legacyPackages = forAllSystems (
|
||||
system: let
|
||||
system:
|
||||
let
|
||||
shatteredPackages = self.packages.${system};
|
||||
legacyPackages = self.legacyPackages.${system};
|
||||
in {
|
||||
in
|
||||
{
|
||||
shatteredprism-debug = shatteredPackages.shatteredprism.override {
|
||||
shatteredprism-unwrapped = legacyPackages.shatteredprism-unwrapped-debug;
|
||||
};
|
||||
|
@ -45,7 +45,8 @@ assert lib.assertMsg (
|
||||
) "controllerSupport only has an effect on Linux.";
|
||||
assert lib.assertMsg (
|
||||
textToSpeechSupport -> stdenv.hostPlatform.isLinux
|
||||
) "textToSpeechSupport only has an effect on Linux."; let
|
||||
) "textToSpeechSupport only has an effect on Linux.";
|
||||
let
|
||||
shatteredprism' = shatteredprism-unwrapped.override { inherit msaClientID gamemodeSupport; };
|
||||
in
|
||||
symlinkJoin {
|
||||
@ -62,14 +63,14 @@ in
|
||||
]
|
||||
++ lib.optional (
|
||||
lib.versionAtLeast kdePackages.qtbase.version "6" && stdenv.hostPlatform.isLinux
|
||||
)
|
||||
kdePackages.qtwayland;
|
||||
) kdePackages.qtwayland;
|
||||
|
||||
postBuild = ''
|
||||
wrapQtAppsHook
|
||||
'';
|
||||
|
||||
qtWrapperArgs = let
|
||||
qtWrapperArgs =
|
||||
let
|
||||
runtimeLibs =
|
||||
[
|
||||
(lib.getLib stdenv.cc.cc)
|
||||
@ -100,13 +101,11 @@ in
|
||||
++ lib.optional controllerSupport libusb1
|
||||
++ additionalLibs;
|
||||
|
||||
runtimePrograms =
|
||||
[
|
||||
runtimePrograms = [
|
||||
mesa-demos
|
||||
pciutils # need lspci
|
||||
xrandr # needed for LWJGL [2.9.2, 3) https://github.com/LWJGL/lwjgl/issues/128
|
||||
]
|
||||
++ additionalPrograms;
|
||||
] ++ additionalPrograms;
|
||||
in
|
||||
[ "--prefix SHATTEREDPRISM_JAVA_PATHS : ${lib.makeSearchPath "bin/java" jdks}" ]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
@ -115,8 +114,7 @@ in
|
||||
];
|
||||
|
||||
meta = {
|
||||
inherit
|
||||
(shatteredprism'.meta)
|
||||
inherit (shatteredprism'.meta)
|
||||
description
|
||||
longDescription
|
||||
homepage
|
||||
|
Loading…
Reference in New Issue
Block a user