nixpkgs/pkgs/applications/office/timeular/default.nix

54 lines
1.6 KiB
Nix
Raw Normal View History

2021-02-27 14:58:42 +00:00
{ lib
, fetchurl
, appimageTools
, libsecret
2020-10-21 07:05:23 +00:00
, gtk3
, gsettings-desktop-schemas
2020-07-04 16:51:11 +00:00
}:
let
2020-10-21 07:05:23 +00:00
version = "3.9.1";
2020-07-04 16:51:11 +00:00
pname = "timeular";
name = "${pname}-${version}";
2020-10-21 07:05:23 +00:00
2020-07-04 16:51:11 +00:00
src = fetchurl {
url = "https://s3.amazonaws.com/timeular-desktop-packages/linux/production/Timeular-${version}.AppImage";
2020-10-21 07:05:23 +00:00
sha256 = "103hy443p697jdkz6li8s1n6kg1r55jmiw2vbjz12kskf7njg4y4";
2020-07-04 16:51:11 +00:00
};
2020-10-21 07:05:23 +00:00
2020-07-04 16:51:11 +00:00
appimageContents = appimageTools.extractType2 {
inherit name src;
};
in appimageTools.wrapType2 rec {
inherit name src;
2020-10-21 07:05:23 +00:00
profile = ''
export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS
'';
2020-07-04 16:51:11 +00:00
extraPkgs = pkgs: with pkgs; [
libsecret
];
extraInstallCommands = ''
mv $out/bin/{${name},${pname}}
install -m 444 -D ${appimageContents}/timeular.desktop $out/share/applications/timeular.desktop
install -m 444 -D ${appimageContents}/timeular.png $out/share/icons/hicolor/512x512/apps/timeular.png
substituteInPlace $out/share/applications/timeular.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
2020-07-04 16:51:11 +00:00
'';
meta = with lib; {
2020-07-04 16:51:11 +00:00
description = "Timetracking by flipping 8-sided dice";
longDescription = ''
The Timeular Tracker is an 8-sided dice that sits on your desk.
Assign an activity to each side and flip to start tracking your time.
The desktop app tell you where every minute of your day is spent.
'';
2021-02-27 14:58:42 +00:00
homepage = "https://timeular.com";
2020-07-04 16:51:11 +00:00
license = licenses.unfree;
maintainers = with maintainers; [ ktor ];
platforms = [ "x86_64-linux" ];
};
}