mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-06 21:42:35 +03:00
nixos/freshrss: migrate to DATA_PATH
This commit is contained in:
parent
67b0da8f51
commit
29d41b7fd2
@ -220,7 +220,7 @@ in
|
|||||||
"catch_workers_output" = true;
|
"catch_workers_output" = true;
|
||||||
};
|
};
|
||||||
phpEnv = {
|
phpEnv = {
|
||||||
FRESHRSS_DATA_PATH = "${cfg.dataDir}";
|
DATA_PATH = "${cfg.dataDir}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -267,7 +267,7 @@ in
|
|||||||
WorkingDirectory = cfg.package;
|
WorkingDirectory = cfg.package;
|
||||||
};
|
};
|
||||||
environment = {
|
environment = {
|
||||||
FRESHRSS_DATA_PATH = cfg.dataDir;
|
DATA_PATH = cfg.dataDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
script =
|
script =
|
||||||
@ -302,7 +302,7 @@ in
|
|||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
startAt = "*:0/5";
|
startAt = "*:0/5";
|
||||||
environment = {
|
environment = {
|
||||||
FRESHRSS_DATA_PATH = cfg.dataDir;
|
DATA_PATH = cfg.dataDir;
|
||||||
};
|
};
|
||||||
serviceConfig = defaultServiceConfig //{
|
serviceConfig = defaultServiceConfig //{
|
||||||
ExecStart = "${cfg.package}/app/actualize_script.php";
|
ExecStart = "${cfg.package}/app/actualize_script.php";
|
||||||
|
@ -26,12 +26,6 @@ stdenvNoCC.mkDerivation rec {
|
|||||||
# There's nothing to build.
|
# There's nothing to build.
|
||||||
dontBuild = true;
|
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 = ''
|
postPatch = ''
|
||||||
patchShebangs cli/*.php app/actualize_script.php
|
patchShebangs cli/*.php app/actualize_script.php
|
||||||
'';
|
'';
|
||||||
@ -39,8 +33,6 @@ stdenvNoCC.mkDerivation rec {
|
|||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp -vr * $out/
|
cp -vr * $out/
|
||||||
|
|
||||||
cp $overrideConfig $out/constants.local.php
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
Loading…
Reference in New Issue
Block a user