2022-03-05 16:20:37 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
2022-10-30 15:09:59 +00:00
|
|
|
, fetchpatch
|
2022-03-05 16:20:37 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
# Point the environment variable $WALLABAG_DATA to a data directory
|
2022-04-27 09:35:20 +00:00
|
|
|
# that contains the folder `app` which must be a clone of
|
2022-03-05 16:20:37 +00:00
|
|
|
# wallabag's configuration files with your customized `parameters.yml`.
|
2022-04-27 09:35:20 +00:00
|
|
|
# In practice you need to copy `${pkgs.wallabag}/app` and the
|
|
|
|
# customizzed `parameters.yml` to $WALLABAG_DATA.
|
2022-03-05 16:20:37 +00:00
|
|
|
# These need to be updated every package upgrade.
|
|
|
|
#
|
|
|
|
# After a package upgrade, empty the `var/cache` folder or unexpected
|
|
|
|
# error will occur.
|
|
|
|
|
|
|
|
let
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "wallabag";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "2.5.3";
|
2022-03-05 16:20:37 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
inherit pname version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-10-30 15:09:59 +00:00
|
|
|
# Release tarball includes vendored files
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchurl {
|
2022-10-30 15:09:59 +00:00
|
|
|
urls = [
|
|
|
|
"https://static.wallabag.org/releases/wallabag-release-${version}.tar.gz"
|
|
|
|
"https://github.com/wallabag/wallabag/releases/download/${version}/wallabag-${version}.tar.gz"
|
|
|
|
];
|
2023-02-02 18:25:31 +00:00
|
|
|
hash = "sha256-a30z9rdXcfc2eVuShEobgDWWHr9TfMwq9WwaWdrI3QU=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-07-18 16:06:22 +00:00
|
|
|
patches = [
|
|
|
|
./wallabag-data.patch # exposes $WALLABAG_DATA
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
# Use sendmail from php.ini instead of FHS path.
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/symfony/swiftmailer-bundle/commit/31a4fed8f621f141ba70cb42ffb8f73184995f4c.patch";
|
|
|
|
stripLen = 1;
|
|
|
|
extraPrefix = "vendor/symfony/swiftmailer-bundle/";
|
|
|
|
sha256 = "rxHiGhKFd/ZWnIfTt6omFLLoNFlyxOYNCHIv/UtxCho=";
|
|
|
|
})
|
2020-07-18 16:06:22 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
2023-02-02 18:25:31 +00:00
|
|
|
runHook preInstall
|
|
|
|
|
2022-03-05 16:20:37 +00:00
|
|
|
mkdir $out
|
2020-04-24 23:36:52 +00:00
|
|
|
cp -R * $out/
|
2023-02-02 18:25:31 +00:00
|
|
|
|
|
|
|
runHook postInstall
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2022-03-05 16:20:37 +00:00
|
|
|
description = "wallabag is a self hostable application for saving web pages";
|
2020-04-24 23:36:52 +00:00
|
|
|
longDescription = ''
|
2022-03-05 16:20:37 +00:00
|
|
|
wallabag is a self-hostable PHP application allowing you to not
|
|
|
|
miss any content anymore. Click, save and read it when you can.
|
|
|
|
It extracts content so that you can read it when you have time.
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
license = licenses.mit;
|
|
|
|
homepage = "http://wallabag.org";
|
2022-03-05 16:20:37 +00:00
|
|
|
changelog = "https://github.com/wallabag/wallabag/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ schneefux ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|