mirror of
https://github.com/tuxdotrs/tshell.git
synced 2026-09-19 18:49:02 +05:30
feat(gpu): add cardwire integration and gpu widget
This commit is contained in:
60
package.nix
60
package.nix
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user