mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2026-09-19 18:19:02 +05:30
style: format code
This commit is contained in:
111
flake.nix
111
flake.nix
@@ -15,66 +15,63 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
quickshell,
|
||||
treefmt-nix,
|
||||
}:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
quickshell,
|
||||
treefmt-nix,
|
||||
}: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
quickshellWithModules = quickshell.packages.${system}.default.withModules [
|
||||
pkgs.qt6.qtbase
|
||||
pkgs.qt6.qtdeclarative
|
||||
pkgs.qt6.qtmultimedia
|
||||
pkgs.qt6.qttranslations
|
||||
];
|
||||
quickshellWithModules = quickshell.packages.${system}.default.withModules [
|
||||
pkgs.qt6.qtbase
|
||||
pkgs.qt6.qtdeclarative
|
||||
pkgs.qt6.qtmultimedia
|
||||
pkgs.qt6.qttranslations
|
||||
];
|
||||
|
||||
treefmtEval = treefmt-nix.lib.evalModule pkgs {
|
||||
projectRootFile = "flake.nix";
|
||||
treefmtEval = treefmt-nix.lib.evalModule pkgs {
|
||||
projectRootFile = "flake.nix";
|
||||
|
||||
programs = {
|
||||
nixfmt.enable = true;
|
||||
qmlformat.enable = true;
|
||||
clang-format.enable = true;
|
||||
};
|
||||
};
|
||||
in
|
||||
rec {
|
||||
formatter.${system} = treefmtEval.config.build.wrapper;
|
||||
|
||||
packages.${system} = {
|
||||
tshell = pkgs.callPackage ./package.nix {
|
||||
inherit quickshellWithModules;
|
||||
};
|
||||
default = packages.${system}.tshell;
|
||||
};
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
packages = [
|
||||
quickshellWithModules
|
||||
pkgs.cava
|
||||
pkgs.wallust
|
||||
pkgs.dbus
|
||||
pkgs.cmake
|
||||
pkgs.ninja
|
||||
pkgs.qt6.qtbase
|
||||
pkgs.qt6.qtdeclarative
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
if [ -d "$PWD/plugin/dist/lib/qt-6/qml" ]; then
|
||||
export NIXPKGS_QT6_QML_IMPORT_PATH="$PWD/plugin/dist/lib/qt-6/qml''${NIXPKGS_QT6_QML_IMPORT_PATH:+:$NIXPKGS_QT6_QML_IMPORT_PATH}"
|
||||
export QML2_IMPORT_PATH="$PWD/plugin/dist/lib/qt-6/qml''${QML2_IMPORT_PATH:+:$QML2_IMPORT_PATH}"
|
||||
else
|
||||
echo "gpu plugin is not built; run from the repo root to enable 'import Tshell.Cardwire':"
|
||||
echo " cmake -S plugin -B plugin/dist -DCMAKE_INSTALL_PREFIX=\$PWD/plugin/dist"
|
||||
echo " cmake --build plugin/dist --target install"
|
||||
fi
|
||||
'';
|
||||
programs = {
|
||||
alejandra.enable = true;
|
||||
qmlformat.enable = true;
|
||||
clang-format.enable = true;
|
||||
};
|
||||
};
|
||||
in rec {
|
||||
formatter.${system} = treefmtEval.config.build.wrapper;
|
||||
|
||||
packages.${system} = {
|
||||
tshell = pkgs.callPackage ./package.nix {
|
||||
inherit quickshellWithModules;
|
||||
};
|
||||
default = packages.${system}.tshell;
|
||||
};
|
||||
|
||||
devShells.${system}.default = pkgs.mkShell {
|
||||
packages = [
|
||||
quickshellWithModules
|
||||
pkgs.cava
|
||||
pkgs.wallust
|
||||
pkgs.dbus
|
||||
pkgs.cmake
|
||||
pkgs.ninja
|
||||
pkgs.qt6.qtbase
|
||||
pkgs.qt6.qtdeclarative
|
||||
];
|
||||
|
||||
shellHook = ''
|
||||
if [ -d "$PWD/plugin/dist/lib/qt-6/qml" ]; then
|
||||
export NIXPKGS_QT6_QML_IMPORT_PATH="$PWD/plugin/dist/lib/qt-6/qml''${NIXPKGS_QT6_QML_IMPORT_PATH:+:$NIXPKGS_QT6_QML_IMPORT_PATH}"
|
||||
export QML2_IMPORT_PATH="$PWD/plugin/dist/lib/qt-6/qml''${QML2_IMPORT_PATH:+:$QML2_IMPORT_PATH}"
|
||||
else
|
||||
echo "gpu plugin is not built; run from the repo root to enable 'import Tshell.Cardwire':"
|
||||
echo " cmake -S plugin -B plugin/dist -DCMAKE_INSTALL_PREFIX=\$PWD/plugin/dist"
|
||||
echo " cmake --build plugin/dist --target install"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user