git.iko.soy/typeable/nixpkgs
on master help sign in
super-productivity: 1.10.45 -> 6.5.2

Version 1.10.45 segfaults, this commit fixes the package

commit92ec5c8583f7f710816100433d21b12d0db8e6c8 authorMax Hausch <github@hausch.xyz> dateWed 14 Apr 2021, 13:33 (6 years ago) parent37a8a32
3 files changed+56−107
pkgs/applications/networking/super-productivity/default.nix−106 pkgs/applications/office/super-productivity/default.nix+55 pkgs/top-level/all-packages.nix+1−1
pkgs/applications/networking/super-productivity/default.nixdeleted−106
@@ -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−}
pkgs/applications/office/super-productivity/default.nixnew file+55
@@ -0,0 +1,55 @@
1+{ stdenv , lib , fetchurl , appimageTools , makeWrapper , electron_11 }:
2+
3+let
4+ electron = electron_11;
5+in
6+stdenv.mkDerivation rec {
7+ pname = "super-productivity";
8+ version = "6.5.2";
9+
10+ src = fetchurl {
11+ url = "https://github.com/johannesjo/super-productivity/releases/download/v${version}/superProductivity-${version}.AppImage";
12+ sha256 = "1ivl7chsv9axgk6nqkf580pav651hchi3di0mrp0pylpsqgk6f1f";
13+ name = "${pname}-${version}.AppImage";
14+ };
15+
16+ appimageContents = appimageTools.extractType2 {
17+ name = "${pname}-${version}";
18+ inherit src;
19+ };
20+
21+ dontUnpack = true;
22+ dontConfigure = true;
23+ dontBuild = true;
24+
25+ nativeBuildInputs = [ makeWrapper ];
26+
27+ installPhase = ''
28+ runHook preInstall
29+
30+ mkdir -p $out/bin $out/share/${pname} $out/share/applications
31+
32+ cp -a ${appimageContents}/{locales,resources} $out/share/${pname}
33+ cp -a ${appimageContents}/superproductivity.desktop $out/share/applications/${pname}.desktop
34+ cp -a ${appimageContents}/usr/share/icons $out/share
35+
36+ substituteInPlace $out/share/applications/${pname}.desktop \
37+ --replace 'Exec=AppRun' 'Exec=${pname}'
38+
39+ runHook postInstall
40+ '';
41+
42+ postFixup = ''
43+ makeWrapper ${electron}/bin/electron $out/bin/${pname} \
44+ --add-flags $out/share/${pname}/resources/app.asar \
45+ --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ]}"
46+ '';
47+
48+ meta = with lib; {
49+ description = "To Do List / Time Tracker with Jira Integration";
50+ homepage = "https://super-productivity.com";
51+ license = licenses.mit;
52+ platforms = [ "x86_64-linux" ];
53+ maintainers = with maintainers; [ offline ];
54+ };
55+}
pkgs/top-level/all-packages.nix+1−1
@@ -23555,7 +23555,7 @@ in
2355523555 withPortAudio = stdenv.isDarwin;
2355623556 };
2355723557
23558− super-productivity = callPackage ../applications/networking/super-productivity { };
23558+ super-productivity = callPackage ../applications/office/super-productivity { };
2355923559
2356023560 wlroots = callPackage ../development/libraries/wlroots {
2356123561 inherit (xorg) xcbutilrenderutil;