2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, dpkg, makeWrapper
|
2018-07-07 15:41:32 +01:00
|
|
|
, alsaLib, atk, cairo, cups, curl, dbus, expat, fontconfig, freetype, glib
|
2019-05-22 12:03:39 +01:00
|
|
|
, gnome2, gtk3, gdk-pixbuf, libnotify, libxcb, nspr, nss, pango
|
2018-07-21 01:44:44 +01:00
|
|
|
, systemd, xorg, xprintidle-ng }:
|
2018-07-07 15:41:32 +01:00
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
version = "1.10.45";
|
|
|
|
|
2021-01-15 05:42:41 +00:00
|
|
|
rpath = lib.makeLibraryPath [
|
2018-07-07 15:41:32 +01:00
|
|
|
alsaLib
|
|
|
|
atk
|
|
|
|
cairo
|
|
|
|
cups
|
|
|
|
curl
|
|
|
|
dbus
|
|
|
|
expat
|
|
|
|
fontconfig
|
|
|
|
freetype
|
|
|
|
glib
|
2018-07-09 23:34:32 +01:00
|
|
|
gnome2.GConf
|
2019-05-22 12:03:39 +01:00
|
|
|
gdk-pixbuf
|
2018-07-07 15:41:32 +01:00
|
|
|
gtk3
|
|
|
|
pango
|
|
|
|
libnotify
|
|
|
|
libxcb
|
|
|
|
nspr
|
|
|
|
nss
|
|
|
|
stdenv.cc.cc
|
|
|
|
systemd
|
|
|
|
|
|
|
|
xorg.libxkbfile
|
|
|
|
xorg.libX11
|
|
|
|
xorg.libXcomposite
|
|
|
|
xorg.libXcursor
|
|
|
|
xorg.libXdamage
|
|
|
|
xorg.libXext
|
|
|
|
xorg.libXfixes
|
|
|
|
xorg.libXi
|
|
|
|
xorg.libXrandr
|
|
|
|
xorg.libXrender
|
|
|
|
xorg.libXtst
|
|
|
|
xorg.libXScrnSaver
|
|
|
|
] + ":${stdenv.cc.cc.lib}/lib64";
|
|
|
|
|
|
|
|
src =
|
2018-08-20 20:11:29 +01:00
|
|
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
2018-07-07 15:41:32 +01:00
|
|
|
fetchurl {
|
|
|
|
url = "https://github.com/johannesjo/super-productivity/releases/download/v${version}/superProductivity_${version}_amd64.deb";
|
|
|
|
sha256 = "0jfi0lfijnhij9jvkhxgyvq8m1jzaym8n1c7707fv3hjh1h0vxn1";
|
|
|
|
}
|
|
|
|
else
|
2018-08-20 20:11:29 +01:00
|
|
|
throw "super-productivity is not supported on ${stdenv.hostPlatform.system}";
|
2018-07-07 15:41:32 +01:00
|
|
|
|
|
|
|
in stdenv.mkDerivation {
|
2019-08-13 22:52:01 +01:00
|
|
|
pname = "super-productivity";
|
|
|
|
inherit version;
|
2018-07-07 15:41:32 +01:00
|
|
|
|
|
|
|
inherit src;
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
dpkg
|
|
|
|
gtk3 # needed for GSETTINGS_SCHEMAS_PATH
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
unpackPhase = "dpkg -x $src .";
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out
|
|
|
|
|
|
|
|
cp -R usr/share $out/share
|
|
|
|
cp -R opt $out/libexec
|
|
|
|
|
|
|
|
# Otherwise it looks "suspicious"
|
|
|
|
chmod -R g-w $out
|
|
|
|
|
|
|
|
# set linker and rpath
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/libexec/superProductivity/superproductivity"
|
|
|
|
patchelf --set-rpath ${rpath}:$out/libexec/superProductivity "$out/libexec/superProductivity/superproductivity"
|
|
|
|
|
|
|
|
# wrapper for xdg_data_dirs and xprintidle path
|
|
|
|
makeWrapper $out/libexec/superProductivity/superproductivity $out/bin/superproductivity \
|
|
|
|
--prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \
|
|
|
|
--prefix PATH : "${xprintidle-ng}/bin"
|
|
|
|
|
|
|
|
# Fix the desktop link
|
|
|
|
substituteInPlace $out/share/applications/superproductivity.desktop \
|
|
|
|
--replace /opt/superProductivity/ $out/bin/
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-10-11 06:55:05 +01:00
|
|
|
description = "To Do List / Time Tracker with Jira Integration";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://super-productivity.com";
|
2018-07-07 15:41:32 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ offline ];
|
|
|
|
};
|
|
|
|
}
|