about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJaka Hudoklin <jakahudoklin@gmail.com>2018-07-07 16:41:32 +0200
committerJaka Hudoklin <jakahudoklin@gmail.com>2018-07-08 11:02:29 +0200
commit0eef67d9fdf9aaf1183063bed9532d0b5a1b6f09 (patch)
tree2b1481ca9e2772092f1dc3aa10d69e43f093d608
parent6ea4c3d335c9c7cf121125f41820bb00aa3043b2 (diff)
downloadnixlib-0eef67d9fdf9aaf1183063bed9532d0b5a1b6f09.tar
nixlib-0eef67d9fdf9aaf1183063bed9532d0b5a1b6f09.tar.gz
nixlib-0eef67d9fdf9aaf1183063bed9532d0b5a1b6f09.tar.bz2
nixlib-0eef67d9fdf9aaf1183063bed9532d0b5a1b6f09.tar.lz
nixlib-0eef67d9fdf9aaf1183063bed9532d0b5a1b6f09.tar.xz
nixlib-0eef67d9fdf9aaf1183063bed9532d0b5a1b6f09.tar.zst
nixlib-0eef67d9fdf9aaf1183063bed9532d0b5a1b6f09.zip
super-productivity: init at 1.10.45
-rw-r--r--pkgs/applications/networking/super-productivity/default.nix105
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 107 insertions, 0 deletions
diff --git a/pkgs/applications/networking/super-productivity/default.nix b/pkgs/applications/networking/super-productivity/default.nix
new file mode 100644
index 000000000000..7c613a8a45a9
--- /dev/null
+++ b/pkgs/applications/networking/super-productivity/default.nix
@@ -0,0 +1,105 @@
+{ stdenv, fetchurl, dpkg, makeWrapper
+, alsaLib, atk, cairo, cups, curl, dbus, expat, fontconfig, freetype, glib
+, gnome3, gtk3, gdk_pixbuf, libnotify, libxcb, nspr, nss, pango
+, systemd, wget, xorg, xprintidle-ng }:
+
+let
+
+  version = "1.10.45";
+
+  rpath = stdenv.lib.makeLibraryPath [
+    alsaLib
+    atk
+    cairo
+    cups
+    curl
+    dbus
+    expat
+    fontconfig
+    freetype
+    glib
+    gnome3.gconf
+    gdk_pixbuf
+    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 =
+    if stdenv.system == "x86_64-linux" then
+      fetchurl {
+        url = "https://github.com/johannesjo/super-productivity/releases/download/v${version}/superProductivity_${version}_amd64.deb";
+        sha256 = "0jfi0lfijnhij9jvkhxgyvq8m1jzaym8n1c7707fv3hjh1h0vxn1";
+      }
+    else
+      throw "super-productivity is not supported on ${stdenv.system}";
+
+in stdenv.mkDerivation {
+  name = "super-productivity-${version}";
+
+  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;
+
+  meta = with stdenv.lib; {
+    description = "To Do List / Time Tracker with Jira Integration.";
+    homepage = http://super-productivity.com;
+    license = licenses.mit;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ offline ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index f7084b0a5fd2..1899a1d66248 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -16559,6 +16559,8 @@ with pkgs;
 
   spectrwm = callPackage ../applications/window-managers/spectrwm { };
 
+  super-productivity = callPackage ../applications/networking/super-productivity { };
+
   wlc = callPackage ../development/libraries/wlc { };
   wlroots = callPackage ../development/libraries/wlroots { };
   rootston = wlroots.bin;