packages: add whph
This commit is contained in:
parent
57ab783364
commit
e8334a04b2
6 changed files with 128 additions and 20 deletions
|
@ -124,8 +124,6 @@
|
|||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
|
||||
# Support virtualization, thunderbolt, and poking the APCI directly. >.>
|
||||
boot.kernelModules = [
|
||||
"thunderbolt"
|
||||
];
|
||||
|
@ -133,6 +131,25 @@
|
|||
# Support thunderbolt.
|
||||
services.hardware.bolt.enable = true;
|
||||
|
||||
# Support bluetooth.
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = false;
|
||||
|
||||
settings = {
|
||||
General = {
|
||||
|
||||
# Support A2DP.
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
|
||||
# Enable experimental featurees, like reading device battery levels.
|
||||
Experimental = true;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/bb880b80-992f-4e56-bb80-c5c4df0ddd72";
|
||||
fsType = "ext4";
|
||||
|
|
|
@ -27,6 +27,7 @@ with pkgs;
|
|||
gnused
|
||||
gnugrep
|
||||
just
|
||||
qrencode
|
||||
|
||||
# Backup things.
|
||||
keepassxc
|
||||
|
|
|
@ -105,6 +105,7 @@ with pkgs;
|
|||
obsidian
|
||||
onboard
|
||||
supersonic
|
||||
deprekages.whph
|
||||
|
||||
# Development.
|
||||
jetbrains-toolbox
|
||||
|
|
|
@ -45,6 +45,7 @@ flake-utils.lib.eachDefaultSystem (
|
|||
hrvst-cli = callPackage ./hrvst-cli { };
|
||||
notion-app = callPackage ./notion-app { inherit _7zz; };
|
||||
gfn-electron = callPackage ./geforce-now { };
|
||||
whph = callPackage ./whph.nix { };
|
||||
|
||||
# utilities
|
||||
ykush = callPackage ./ykush.nix { };
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
asar,
|
||||
writeScriptBin,
|
||||
bash,
|
||||
libgcc
|
||||
libgcc,
|
||||
}:
|
||||
let
|
||||
better-sqlite3-version = "11.4.0";
|
||||
|
|
88
packages/whph.nix
Normal file
88
packages/whph.nix
Normal file
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchzip,
|
||||
autoPatchelfHook,
|
||||
xorg,
|
||||
gtk3,
|
||||
zlib,
|
||||
pango,
|
||||
cairo,
|
||||
harfbuzz,
|
||||
at-spi2-atk,
|
||||
gdk-pixbuf,
|
||||
glib,
|
||||
gst_all_1,
|
||||
libayatana-appindicator,
|
||||
}:
|
||||
let
|
||||
this = stdenv.mkDerivation {
|
||||
pname = "whph";
|
||||
version = "0.10.1";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/ahmet-cetinkaya/whph/releases/download/v${this.version}/whph-v${this.version}-linux.tar.gz";
|
||||
hash = "sha256-RnxeqZBS7U65Dz0gc/uMDMnWU3tDN/Jx3Czs1gn0rJk=";
|
||||
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
xorg.libSM
|
||||
xorg.libICE
|
||||
xorg.libX11
|
||||
xorg.libXext
|
||||
gtk3
|
||||
zlib
|
||||
pango
|
||||
cairo
|
||||
harfbuzz
|
||||
at-spi2-atk
|
||||
gdk-pixbuf
|
||||
glib
|
||||
gst_all_1.gst-plugins-base
|
||||
libayatana-appindicator
|
||||
];
|
||||
|
||||
desktopFile = ''
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=WHPH
|
||||
GenericName=Work Hard Play Hard; Task Manager
|
||||
Comment=manager for tasks, habits, and screen use in one
|
||||
Exec=${placeholder "out"}/bin/whph %U
|
||||
Icon=${placeholder "out"}/opt/${this.pname}/share/icons/hicolor/512x512/apps/whph.png
|
||||
Categories=Office;ProjectManagement;
|
||||
MimeType=x-scheme-handler/notion;
|
||||
StartupNotify=false
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/opt/${this.pname}
|
||||
|
||||
cp -r $src/* $out/opt/${this.pname}/
|
||||
addAutoPatchelfSearchPath ${this.src}/lib/
|
||||
|
||||
# Launch wrapper.
|
||||
echo "#!/bin/sh" >> $out/bin/whph
|
||||
echo "$out/opt/${this.pname}/whph \$@" >> $out/bin/whph
|
||||
chmod +x $out/bin/whph
|
||||
|
||||
# Application menu entry.
|
||||
mkdir -p $out/share/applications
|
||||
echo "$desktopFile" > $out/share/applications/whph.desktop
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
};
|
||||
in
|
||||
this
|
Loading…
Add table
Reference in a new issue