Skip to content

Commit

Permalink
trilium: bump to 0.25.2, rework a bit... works! \o/
Browse files Browse the repository at this point in the history
* fix URL
* let setup-hook handle unpacking
* wrap AND autoPatchelfHook, for reasons I guess
  • Loading branch information
dtzWill committed Dec 18, 2018
1 parent 66497a7 commit e6252ff
Showing 1 changed file with 22 additions and 12 deletions.
34 changes: 22 additions & 12 deletions pkgs/applications/office/trilium/default.nix
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
{ stdenv, fetchurl, p7zip }:
{ stdenv, fetchurl, p7zip, autoPatchelfHook, atomEnv, makeWrapper }:

stdenv.mkDerivation rec {
name = "trilium-${version}";
version = "0.24.5";

phases = [ "unpackPhase" "installPhase" ];
version = "0.25.2";

src = fetchurl {
url = "https://github.com/zadam/trilium/releases/download/${version}/trilium-linux-x64-${version}.7z";
sha256 = "0dpkw875k941wkj14r3x86q15da3kjihb4lg4sjxbmhq2gv4jdjv";
url = "https://github.com/zadam/trilium/releases/download/v${version}/trilium-linux-x64-${version}.7z";
sha256 = "0rzh40jq61qsai0bhvrflzbv4vkrv8alxw9k95s0vk3nj0wr36z1";
};

unpackCmd = ''
${p7zip}/bin/7zr x $curSrc
'';
nativeBuildInputs = [
p7zip /* for unpacking */
autoPatchelfHook
makeWrapper
];

buildInputs = atomEnv.packages;

installPhase = ''
mkdir -p $out/bin
mkdir -p $out/usr/share/trilium
mkdir -p $out/share/trilium
cp -r ./* $out/usr/share/trilium
ln -s $out/usr/share/trilium/trilium $out/bin/trilium
cp -r ./* $out/share/trilium
ln -s $out/share/trilium/trilium $out/bin/trilium
'';


# This "shouldn't" be needed, remove when possible :)
preFixup = ''
wrapProgram $out/bin/trilium --prefix LD_LIBRARY_PATH : "${atomEnv.libPath}"
'';

dontStrip = true;

meta = with stdenv.lib; {
description = "Trilium Notes is a hierarchical note taking application with focus on building large personal knowledge bases.";
homepage = https://github.com/zadam/trilium;
Expand Down

0 comments on commit e6252ff

Please sign in to comment.