feat(gpu): add cardwire integration and gpu widget

This commit is contained in:
tux
2026-08-25 00:38:14 +05:30
parent 4453c280bf
commit c9310e802b
10 changed files with 709 additions and 24 deletions

View File

@@ -3,7 +3,10 @@
stdenv,
makeWrapper,
makeFontsConf,
cmake,
ninja,
quickshellWithModules,
qt6,
cava,
wallust,
nerd-fonts,
@@ -21,41 +24,52 @@ let
fontconfig = makeFontsConf {
fontDirectories = [ nerd-fonts.fira-code ];
};
# Unlike lib.fileset, this keeps untracked files (the flake only sees
# git-tracked paths) while dropping build artifacts.
src = lib.cleanSourceWith {
src = lib.cleanSource ./.;
filter =
path: _:
let
name = baseNameOf path;
in
!(name == "dist" || name == "result" || name == "result-bin" || lib.hasPrefix "build" name);
};
in
stdenv.mkDerivation {
inherit version;
inherit version src;
pname = "tshell";
src = lib.fileset.toSource {
root = ./.;
fileset = lib.fileset.unions [
./shell.qml
./assets
./config
./modules
./services
./ui
./windows
];
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ quickshellWithModules ];
dontWrapQtApps = true;
preConfigure = ''
cd plugin
'';
nativeBuildInputs = [
cmake
ninja
makeWrapper
];
buildInputs = [
qt6.qtbase
qt6.qtdeclarative
];
propagatedBuildInputs = runtimeDeps;
dontBuild = true;
installPhase = ''
runHook preInstall
postInstall = ''
mkdir -p $out/bin $out/share/tshell
cp -r . $out/share/tshell
for entry in shell.qml assets config modules services ui windows; do
cp -r "$src/$entry" $out/share/tshell/
done
makeWrapper ${quickshellWithModules}/bin/qs $out/bin/tshell \
--prefix PATH : "${lib.makeBinPath runtimeDeps}" \
--set FONTCONFIG_FILE "${fontconfig}" \
--suffix NIXPKGS_QT6_QML_IMPORT_PATH : "$out/lib/qt-6/qml" \
--add-flags "-p $out/share/tshell"
runHook postInstall
'';
meta = {