1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-22 06:05:13 +00:00
nixpkgs/pkgs/servers/web-apps/wallabag/default.nix

43 lines
1.4 KiB
Nix
Raw Normal View History

2016-10-22 16:20:49 +01:00
{ stdenv, fetchurl }:
stdenv.mkDerivation rec {
name = "wallabag-${version}";
2017-12-29 15:26:40 +00:00
version = "2.3.1";
2016-10-22 16:20:49 +01:00
# remember to rm -r var/cache/* after a rebuild or unexpected errors will occur
src = fetchurl {
2017-04-28 14:27:44 +01:00
url = "https://static.wallabag.org/releases/wallabag-release-${version}.tar.gz";
2017-12-29 15:26:40 +00:00
sha256 = "1qk7jicni5g8acpjybrwnwf7zknk3b0mxiv5876lrsajcxdxwnf4";
2016-10-22 16:20:49 +01:00
};
2017-12-29 15:26:40 +00:00
outputs = [ "out" ];
2016-10-22 16:20:49 +01:00
patchPhase = ''
rm Makefile # use the "shared hosting" package with bundled dependencies
substituteInPlace app/AppKernel.php \
--replace "__DIR__" "getenv('WALLABAG_DATA')"
substituteInPlace var/bootstrap.php.cache \
--replace "\$this->rootDir = \$this->getRootDir()" "\$this->rootDir = getenv('WALLABAG_DATA')"
''; # exposes $WALLABAG_DATA
installPhase = ''
mkdir $out/
cp -R * $out/
'';
meta = with stdenv.lib; {
description = "Web page archiver";
longDescription = ''
wallabag is a self hostable application for saving web pages.
To use, point the environment variable $WALLABAG_DATA to a directory called `app` that contains the folder `config` with wallabag's configuration files. These need to be updated every package upgrade. In `app`'s parent folder, a directory called `var` containing wallabag's data will be created.
After a package upgrade, empty the `var/cache` folder.
'';
license = licenses.mit;
homepage = http://wallabag.org;
platforms = platforms.all;
};
}