2016-10-22 12:43:47 +01:00
|
|
|
{ stdenv, fetchurl }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "shaarli-${version}";
|
2017-10-21 10:43:08 +01:00
|
|
|
version = "0.9.2";
|
2016-10-22 12:43:47 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2016-12-13 20:56:14 +00:00
|
|
|
url = "https://github.com/shaarli/Shaarli/releases/download/v${version}/shaarli-v${version}-full.tar.gz";
|
2017-10-21 10:43:08 +01:00
|
|
|
sha256 = "07wn5pg7pkya8d4k2khp2jyvkdkmm5431fj1k0m1i5k65yyvfqzr";
|
2016-10-22 12:43:47 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = [ "out" "doc" ];
|
|
|
|
|
|
|
|
patchPhase = ''
|
|
|
|
substituteInPlace index.php \
|
|
|
|
--replace "new ConfigManager();" "new ConfigManager(getenv('SHAARLI_CONFIG'));"
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Point $SHAARLI_CONFIG to your configuration file, see https://github.com/shaarli/Shaarli/wiki/Shaarli-configuration.
|
|
|
|
# For example:
|
|
|
|
# <?php /*
|
|
|
|
# {
|
|
|
|
# "credentials": {
|
|
|
|
# "login": "user",
|
|
|
|
# "hash": "(password hash)",
|
|
|
|
# "salt": "(password salt)"
|
|
|
|
# },
|
|
|
|
# "resource": {
|
|
|
|
# "data_dir": "\/var\/lib\/shaarli",
|
|
|
|
# "config": "\/var\/lib\/shaarli\/config.json.php",
|
|
|
|
# "datastore": "\/var\/lib\/shaarli\/datastore.php",
|
|
|
|
# "ban_file": "\/var\/lib\/shaarli\/ipbans.php",
|
|
|
|
# "updates": "\/var\/lib\/shaarli\/updates.txt",
|
|
|
|
# "log": "\/var\/lib\/shaarli\/log.txt",
|
|
|
|
# "update_check": "\/var\/lib\/shaarli\/lastupdatecheck.txt",
|
|
|
|
# "raintpl_tmp": "\/var\/lib\/shaarli\/tmp",
|
|
|
|
# "thumbnails_cache": "\/var\/lib\/shaarli\/cache",
|
|
|
|
# "page_cache": "\/var\/lib\/shaarli\/pagecache"
|
|
|
|
# },
|
|
|
|
# "updates": {
|
|
|
|
# "check_updates": false
|
|
|
|
# }
|
|
|
|
# }
|
|
|
|
# */ ?>
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
rm -r {cache,pagecache,tmp,data}/
|
2017-07-10 12:44:29 +01:00
|
|
|
mkdir -p $doc/share/doc
|
|
|
|
mv doc/ $doc/share/doc/shaarli
|
2016-10-22 12:43:47 +01:00
|
|
|
mkdir $out/
|
|
|
|
cp -R ./* $out
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "The personal, minimalist, super-fast, database free, bookmarking service";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
homepage = https://github.com/shaarli/Shaarli;
|
2017-10-21 10:43:08 +01:00
|
|
|
maintainers = with maintainers; [ schneefux ];
|
2016-10-22 12:43:47 +01:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|