{ stdenv, fetchurl }: stdenv.mkDerivation rec { pname = "shaarli"; version = "0.12.1"; src = fetchurl { url = "https://github.com/shaarli/Shaarli/releases/download/v${version}/shaarli-v${version}-full.tar.gz"; sha256 = "02zwfr92bmr8pnkrg6my31wx2qapddcgmfsq44msfpmvvnxfj57n"; }; 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: # 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; }; }