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