From 7a57be47bbf7547d5bd6e4bbc20a2aa62a6b953c Mon Sep 17 00:00:00 2001 From: schneefux Date: Sat, 22 Oct 2016 17:20:49 +0200 Subject: [PATCH] wallabag: init at 2.1.2 --- pkgs/servers/web-apps/wallabag/default.nix | 43 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 45 insertions(+) create mode 100644 pkgs/servers/web-apps/wallabag/default.nix diff --git a/pkgs/servers/web-apps/wallabag/default.nix b/pkgs/servers/web-apps/wallabag/default.nix new file mode 100644 index 000000000000..68732b2e169b --- /dev/null +++ b/pkgs/servers/web-apps/wallabag/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "wallabag-${version}"; + version = "2.1.2"; + + # remember to rm -r var/cache/* after a rebuild or unexpected errors will occur + + src = fetchurl { + url = "https://framabag.org/wallabag-release-${version}.tar.gz"; + sha256 = "01i4xdzw126wwwkxy0d97dizrikvawpzqj95bykd1g25m7jzvb7k"; + }; + + outputs = [ "out" "doc" ]; + + 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 = '' + mv docs $doc/ + 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; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0a681125f635..7a514249fda5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10301,6 +10301,8 @@ in vsftpd = callPackage ../servers/ftp/vsftpd { }; + wallabag = callPackage ../servers/web-apps/wallabag { }; + winstone = callPackage ../servers/http/winstone { }; xinetd = callPackage ../servers/xinetd { };