88 lines
1.8 KiB
Nix
88 lines
1.8 KiB
Nix
{
|
|
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
|