1 { lib, stdenv, autoPatchelfHook, fetchurl, nixosTests
5 serverSource.url = "https://github.com/zadam/trilium/releases/download/v${version}/trilium-linux-x64-server-${version}.tar.xz";
6 serverSource.sha256 = "0gwp6h6nvfzq7k1g3233h838nans45jkd5c3pzl6qdhhm19vcs27";
8 in stdenv.mkDerivation {
9 pname = "trilium-server";
11 meta = metaCommon // {
12 platforms = [ "x86_64-linux" ];
15 src = fetchurl serverSource;
22 (lib.getLib stdenv.cc.cc)
26 # patch logger to use console instead of rolling files
27 ./0001-Use-console-logger-instead-of-rolling-files.patch
33 mkdir -p $out/share/trilium-server
35 cp -r ./* $out/share/trilium-server
40 cat > $out/bin/trilium-server <<EOF
42 cd $out/share/trilium-server
43 exec ./node/bin/node src/www
45 chmod a+x $out/bin/trilium-server
49 trilium-server = nixosTests.trilium-server;