@@ -1,106 +0,0 @@
1−{ lib, stdenv, fetchurl, dpkg, makeWrapper
2−, alsaLib, atk, cairo, cups, curl, dbus, expat, fontconfig, freetype, glib
3−, gnome2, gtk3, gdk-pixbuf, libnotify, libxcb, nspr, nss, pango
4−, systemd, xorg, xprintidle-ng }:
5−
6−let
7−
8− version = "1.10.45";
9−
10− rpath = lib.makeLibraryPath [
11− alsaLib
12− atk
13− cairo
14− cups
15− curl
16− dbus
17− expat
18− fontconfig
19− freetype
20− glib
21− gnome2.GConf
22− gdk-pixbuf
23− gtk3
24− pango
25− libnotify
26− libxcb
27− nspr
28− nss
29− stdenv.cc.cc
30− systemd
31−
32− xorg.libxkbfile
33− xorg.libX11
34− xorg.libXcomposite
35− xorg.libXcursor
36− xorg.libXdamage
37− xorg.libXext
38− xorg.libXfixes
39− xorg.libXi
40− xorg.libXrandr
41− xorg.libXrender
42− xorg.libXtst
43− xorg.libXScrnSaver
44− ] + ":${stdenv.cc.cc.lib}/lib64";
45−
46− src =
47− if stdenv.hostPlatform.system == "x86_64-linux" then
48− fetchurl {
49− url = "https://github.com/johannesjo/super-productivity/releases/download/v${version}/superProductivity_${version}_amd64.deb";
50− sha256 = "0jfi0lfijnhij9jvkhxgyvq8m1jzaym8n1c7707fv3hjh1h0vxn1";
51− }
52− else
53− throw "super-productivity is not supported on ${stdenv.hostPlatform.system}";
54−
55−in stdenv.mkDerivation {
56− pname = "super-productivity";
57− inherit version;
58−
59− inherit src;
60−
61− buildInputs = [
62− dpkg
63− gtk3 # needed for GSETTINGS_SCHEMAS_PATH
64− ];
65−
66− nativeBuildInputs = [ makeWrapper ];
67−
68− unpackPhase = "dpkg -x $src .";
69−
70− installPhase = ''
71− runHook preInstall
72−
73− mkdir -p $out
74−
75− cp -R usr/share $out/share
76− cp -R opt $out/libexec
77−
78− # Otherwise it looks "suspicious"
79− chmod -R g-w $out
80−
81− # set linker and rpath
82− patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$out/libexec/superProductivity/superproductivity"
83− patchelf --set-rpath ${rpath}:$out/libexec/superProductivity "$out/libexec/superProductivity/superproductivity"
84−
85− # wrapper for xdg_data_dirs and xprintidle path
86− makeWrapper $out/libexec/superProductivity/superproductivity $out/bin/superproductivity \
87− --prefix XDG_DATA_DIRS : $GSETTINGS_SCHEMAS_PATH \
88− --prefix PATH : "${xprintidle-ng}/bin"
89−
90− # Fix the desktop link
91− substituteInPlace $out/share/applications/superproductivity.desktop \
92− --replace /opt/superProductivity/ $out/bin/
93−
94− runHook postInstall
95− '';
96−
97− dontStrip = true;
98−
99− meta = with lib; {
100− description = "To Do List / Time Tracker with Jira Integration";
101− homepage = "https://super-productivity.com";
102− license = licenses.mit;
103− platforms = [ "x86_64-linux" ];
104− maintainers = with maintainers; [ offline ];
105− };
106−}