nixpkgs-suyu/pkgs/servers/web-apps/shaarli/default.nix
Ryan Mulligan 932048c127 shaarli: 0.9.5 -> 0.9.6
Semi-automatic update generated by https://github.com/ryantm/nix-update tools.

This update was made based on information from https://repology.org/metapackage/shaarli/versions.

These checks were done:

- built on NixOS
- Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.)
- found 0.9.6 with grep in /nix/store/4asag0l86pv5s0klsgh61zga9ih1sllq-shaarli-0.9.6
- directory tree listing: https://gist.github.com/00a45b2940bf8949773bbdbe4e80767d
2018-03-27 23:33:15 -07:00

61 lines
2 KiB
Nix

{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "shaarli-${version}";
version = "0.9.6";
src = fetchurl {
url = "https://github.com/shaarli/Shaarli/releases/download/v${version}/shaarli-v${version}-full.tar.gz";
sha256 = "0vi59988bjxb1cyifh0fynpxa7l6cl0v57hrxima5c9iid10pw54";
};
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}/
mkdir -p $doc/share/doc
mv doc/ $doc/share/doc/shaarli
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;
maintainers = with maintainers; [ schneefux ];
platforms = platforms.all;
};
}