about summary refs log tree commit diff
path: root/pkgs/applications/office/super-productivity/default.nix
diff options
context:
space:
mode:
authorMax Hausch <github@hausch.xyz>2021-04-14 13:33:17 +0200
committerJörg Thalheim <joerg@thalheim.io>2021-04-14 14:53:48 +0200
commit92ec5c8583f7f710816100433d21b12d0db8e6c8 (patch)
tree2cd0984ae350198faa61898715a2e3dfd1ef2427 /pkgs/applications/office/super-productivity/default.nix
parent37a8a32777945454d58b59e1edb3270f49ecb41c (diff)
super-productivity: 1.10.45 -> 6.5.2
Version 1.10.45 segfaults, this commit fixes the package
Diffstat (limited to 'pkgs/applications/office/super-productivity/default.nix')
-rw-r--r--pkgs/applications/office/super-productivity/default.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/applications/office/super-productivity/default.nix b/pkgs/applications/office/super-productivity/default.nix
new file mode 100644
index 0000000000000..7793db2138c8f
--- /dev/null
+++ b/pkgs/applications/office/super-productivity/default.nix
@@ -0,0 +1,55 @@
+{ stdenv , lib , fetchurl , appimageTools , makeWrapper , electron_11 }:
+
+let
+  electron = electron_11;
+in
+stdenv.mkDerivation rec {
+  pname = "super-productivity";
+  version = "6.5.2";
+
+  src = fetchurl {
+    url = "https://github.com/johannesjo/super-productivity/releases/download/v${version}/superProductivity-${version}.AppImage";
+    sha256 = "1ivl7chsv9axgk6nqkf580pav651hchi3di0mrp0pylpsqgk6f1f";
+    name = "${pname}-${version}.AppImage";
+  };
+
+  appimageContents = appimageTools.extractType2 {
+    name = "${pname}-${version}";
+    inherit src;
+  };
+
+  dontUnpack = true;
+  dontConfigure = true;
+  dontBuild = true;
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  installPhase = ''
+    runHook preInstall
+
+    mkdir -p $out/bin $out/share/${pname} $out/share/applications
+
+    cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
+    cp -a ${appimageContents}/superproductivity.desktop $out/share/applications/${pname}.desktop
+    cp -a ${appimageContents}/usr/share/icons $out/share
+
+    substituteInPlace $out/share/applications/${pname}.desktop \
+      --replace 'Exec=AppRun' 'Exec=${pname}'
+
+    runHook postInstall
+  '';
+
+  postFixup = ''
+    makeWrapper ${electron}/bin/electron $out/bin/${pname} \
+      --add-flags $out/share/${pname}/resources/app.asar \
+      --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ]}"
+  '';
+
+  meta = with lib; {
+    description = "To Do List / Time Tracker with Jira Integration";
+    homepage = "https://super-productivity.com";
+    license = licenses.mit;
+    platforms = [ "x86_64-linux" ];
+    maintainers = with maintainers; [ offline ];
+  };
+}