mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-11 23:57:16 +00:00
fix: replace relative paths in sources with nix store paths
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
This commit is contained in:
parent
d8fb82bc23
commit
0ec7dd5011
@ -57,7 +57,6 @@ in
|
|||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
PRODUCTION = "true";
|
PRODUCTION = "true";
|
||||||
ALEMBIC_CONFIG_FILE="${pkg}/config/alembic.ini";
|
|
||||||
API_PORT = toString cfg.port;
|
API_PORT = toString cfg.port;
|
||||||
BASE_URL = "http://localhost:${toString cfg.port}";
|
BASE_URL = "http://localhost:${toString cfg.port}";
|
||||||
DATA_DIR = "/var/lib/mealie";
|
DATA_DIR = "/var/lib/mealie";
|
||||||
|
@ -93,8 +93,16 @@ pythonpkgs.buildPythonPackage rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
rm -rf dev # Do not need dev scripts & code
|
||||||
|
|
||||||
substituteInPlace mealie/__init__.py \
|
substituteInPlace mealie/__init__.py \
|
||||||
--replace-fail '__version__ = ' '__version__ = "v${version}" #'
|
--replace-fail '__version__ = ' '__version__ = "v${version}" #'
|
||||||
|
|
||||||
|
substituteInPlace mealie/services/backups_v2/alchemy_exporter.py \
|
||||||
|
--replace-fail 'PROJECT_DIR = ' "PROJECT_DIR = Path('$out') #"
|
||||||
|
|
||||||
|
substituteInPlace mealie/db/init_db.py \
|
||||||
|
--replace-fail 'PROJECT_DIR = ' "PROJECT_DIR = Path('$out') #"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = let
|
postInstall = let
|
||||||
@ -106,10 +114,10 @@ pythonpkgs.buildPythonPackage rec {
|
|||||||
${python.interpreter} $OUT/${python.sitePackages}/mealie/db/init_db.py
|
${python.interpreter} $OUT/${python.sitePackages}/mealie/db/init_db.py
|
||||||
'';
|
'';
|
||||||
in ''
|
in ''
|
||||||
mkdir -p $out/config $out/bin $out/libexec
|
mkdir -p $out/bin $out/libexec
|
||||||
rm -f $out/bin/*
|
rm -f $out/bin/*
|
||||||
|
|
||||||
substitute ${src}/alembic.ini $out/config/alembic.ini \
|
substitute ${src}/alembic.ini $out/alembic.ini \
|
||||||
--replace-fail 'script_location = alembic' 'script_location = ${src}/alembic'
|
--replace-fail 'script_location = alembic' 'script_location = ${src}/alembic'
|
||||||
|
|
||||||
makeWrapper ${start_script} $out/bin/mealie \
|
makeWrapper ${start_script} $out/bin/mealie \
|
||||||
|
Loading…
Reference in New Issue
Block a user