mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2026-09-19 10:19:02 +05:30
build(nix): add package derivation for tshell
This commit is contained in:
@@ -42,9 +42,16 @@
|
||||
};
|
||||
};
|
||||
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
|
||||
|
||||
68
package.nix
Normal file
68
package.nix
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
makeWrapper,
|
||||
makeFontsConf,
|
||||
quickshellWithModules,
|
||||
cava,
|
||||
wallust,
|
||||
nerd-fonts,
|
||||
extraRuntimeDeps ? [ ],
|
||||
}:
|
||||
let
|
||||
version = "0.1.0";
|
||||
|
||||
runtimeDeps = [
|
||||
cava
|
||||
wallust
|
||||
]
|
||||
++ extraRuntimeDeps;
|
||||
|
||||
fontconfig = makeFontsConf {
|
||||
fontDirectories = [ nerd-fonts.fira-code ];
|
||||
};
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
inherit version;
|
||||
pname = "tshell";
|
||||
src = lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = lib.fileset.unions [
|
||||
./shell.qml
|
||||
./assets
|
||||
./config
|
||||
./modules
|
||||
./services
|
||||
./ui
|
||||
./windows
|
||||
];
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
buildInputs = [ quickshellWithModules ];
|
||||
propagatedBuildInputs = runtimeDeps;
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin $out/share/tshell
|
||||
cp -r . $out/share/tshell
|
||||
|
||||
makeWrapper ${quickshellWithModules}/bin/qs $out/bin/tshell \
|
||||
--prefix PATH : "${lib.makeBinPath runtimeDeps}" \
|
||||
--set FONTCONFIG_FILE "${fontconfig}" \
|
||||
--add-flags "-p $out/share/tshell"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "tux's widgets for wayland";
|
||||
homepage = "https://github.com/tuxdotrs/tshell";
|
||||
license = lib.licenses.gpl3Only;
|
||||
mainProgram = "tshell";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user