chore(nix): nixfmt

This commit is contained in:
Evan Goode 2024-11-30 17:29:26 -05:00
parent a5bca15d46
commit 6879344334
3 changed files with 215 additions and 208 deletions

View File

@ -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}.fjordlauncher-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
fjordPackages = self.packages.${system};
legacyPackages = self.legacyPackages.${system};
in {
in
{
fjordlauncher-debug = fjordPackages.fjordlauncher.override {
fjordlauncher-unwrapped = legacyPackages.fjordlauncher-unwrapped-debug;
};

View File

@ -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
fjordlauncher' = fjordlauncher-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 FJORDLAUNCHER_JAVA_PATHS : ${lib.makeSearchPath "bin/java" jdks}" ]
++ lib.optionals stdenv.hostPlatform.isLinux [
@ -115,8 +114,7 @@ in
];
meta = {
inherit
(fjordlauncher'.meta)
inherit (fjordlauncher'.meta)
description
longDescription
homepage