nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 libX11,
3 libxcb,
4 libXcomposite,
5 libXdamage,
6 libXext,
7 libXfixes,
8 libXrandr,
9 stdenv,
10 lib,
11 alsa-lib,
12 at-spi2-atk,
13 atkmm,
14 cairo,
15 cups,
16 dbus,
17 expat,
18 glib,
19 gtk3,
20 libdrm,
21 libglvnd,
22 libxkbcommon,
23 libgbm,
24 nspr,
25 nss,
26 pango,
27 systemd,
28 fetchurl,
29 autoPatchelfHook,
30 dpkg,
31}:
32let
33 glLibs = [
34 libglvnd
35 libgbm
36 ];
37 libs = [
38 alsa-lib
39 atkmm
40 at-spi2-atk
41 cairo
42 cups
43 dbus
44 expat
45 glib
46 gtk3
47 libdrm
48 libX11
49 libxcb
50 libXcomposite
51 libXdamage
52 libXext
53 libXfixes
54 libxkbcommon
55 libXrandr
56 nspr
57 nss
58 pango
59 ];
60 buildInputs = glLibs ++ libs;
61 runpathPackages = glLibs ++ [
62 stdenv.cc.cc
63 stdenv.cc.libc
64 ];
65 version = "1.0.37";
66in
67stdenv.mkDerivation {
68 pname = "tana";
69 inherit version buildInputs;
70
71 src = fetchurl {
72 url = "https://github.com/tanainc/tana-desktop-releases/releases/download/v${version}/tana_${version}_amd64.deb";
73 hash = "sha256-S7aihKoeP1zJpMd+mdb6D9QEtFBghyVU+K0nSzGd2ew=";
74 };
75
76 nativeBuildInputs = [
77 autoPatchelfHook
78 dpkg
79 ];
80
81 appendRunpaths = map (pkg: "${lib.getLib pkg}/lib") runpathPackages ++ [
82 "${placeholder "out"}/lib/tana"
83 ];
84
85 # Needed for Zygote
86 runtimeDependencies = [
87 systemd
88 ];
89
90 installPhase = ''
91 runHook preInstall
92 mkdir -p $out
93 cp -r usr/* $out
94 runHook postInstall
95 '';
96
97 postFixup = ''
98 substituteInPlace $out/share/applications/tana.desktop \
99 --replace "Exec=tana" "Exec=$out/bin/tana" \
100 --replace "Name=tana" "Name=Tana"
101 '';
102
103 meta = with lib; {
104 description = "Tana is an intelligent all-in-one workspace";
105 longDescription = ''
106 At its core, Tana is an outline editor which can be extended to
107 cover multiple use-cases and different workflows.
108 For individuals, it supports GTD, P.A.R.A., Zettelkasten note-taking
109 out of the box. Teams can leverage the powerful project management
110 views, like Kanban.
111 To complete all, a powerful AI system is integrated to help with most
112 of the tasks.
113 '';
114 homepage = "https://tana.inc";
115 changelog = "https://tana.inc/releases";
116 license = licenses.unfree;
117 maintainers = [ maintainers.massimogengarelli ];
118 platforms = platforms.linux;
119 mainProgram = "tana";
120 };
121}