helm/pkgs/pkg-shaarli.nix

35 lines
968 B
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, config ? null, dataDir ? "/var/lib/shaarli" }:
stdenv.mkDerivation rec {
name = "shaarli-${version}";
version = "0.11.1";
preferLocalBuild = true;
src = fetchurl {
url = "https://github.com/shaarli/Shaarli/releases/download/v0.11.1/shaarli-v${version}-full.tar.gz";
sha256 = "1psijcmi24hk0gxh1zdsm299xj11i7find2045nnx3r96cgnwjpn";
};
phases = [ "installPhase" ];
installPhase = ''
mkdir $out
tar xzf $src
cp -ra Shaarli/. $out/
find $out -type d -exec chmod 0755 {} \;
find $out -type f -exec chmod 0644 {} \;
for a in cache data pagecache tmp; do
mv $out/$a $out/$a.orig
ln -s "${dataDir}/$a" $out/$a
done
'';
meta = with stdenv.lib; {
description = "";
# License is complicated...
#license = licenses.agpl3;
homepage = "https://github.com/shaarli/Shaarli";
platforms = platforms.all;
maintainers = with stdenv.lib.maintainers; [ tokudan ];
};
}