depot/third_party/nixpkgs/pkgs/servers/web-apps/freshrss/default.nix
Default email a66bca1520 Project import generated by Copybara.
GitOrigin-RevId: 40f79f003b6377bd2f4ed4027dde1f8f922995dd
2022-12-17 11:02:37 +01:00

50 lines
1 KiB
Nix

{ stdenvNoCC
, lib
, fetchFromGitHub
, nixosTests
, php
, pkgs
}:
stdenvNoCC.mkDerivation rec {
pname = "FreshRSS";
version = "1.20.2";
src = fetchFromGitHub {
owner = "FreshRSS";
repo = "FreshRSS";
rev = version;
hash = "sha256-l1SOaQA4C8yXbrfi7pEE1PpUO4DVmLTTDUSACCSQ5LE=";
};
passthru.tests = nixosTests.freshrss;
buildInputs = [ php ];
# There's nothing to build.
dontBuild = true;
# the data folder is no in this package and thereby declared by an env-var
overrideConfig = pkgs.writeText "constants.local.php" ''
<?php
define('DATA_PATH', getenv('FRESHRSS_DATA_PATH'));
'';
postPatch = ''
patchShebangs cli/*.php app/actualize_script.php
'';
installPhase = ''
mkdir -p $out
cp -vr * $out/
cp $overrideConfig $out/constants.local.php
'';
meta = with lib; {
description = "FreshRSS is a free, self-hostable RSS aggregator";
homepage = "https://www.freshrss.org/";
license = licenses.agpl3Plus;
maintainers = with maintainers; [ etu stunkymonkey ];
};
}