services.wger: updated to newest version + added auth proxy header
This commit is contained in:
parent
5c65f7f922
commit
94e08fd2f0
3 changed files with 19 additions and 46 deletions
|
@ -4,20 +4,21 @@
|
|||
fetchFromGitHub,
|
||||
callPackage,
|
||||
writeText,
|
||||
fetchpatch,
|
||||
}:
|
||||
|
||||
let
|
||||
frontend = callPackage ./frontend.nix {};
|
||||
in python3.pkgs.buildPythonPackage rec {
|
||||
pname = "wger";
|
||||
version = "unstable-2024-12-01";
|
||||
version = "unstable-2024-12-30";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "wger-project";
|
||||
repo = "wger";
|
||||
rev = "bfca74e88f6c9ff6e917e0ba0e8e9c782ae0047b";
|
||||
hash = "sha256-VuVKgkNp6Omiag72lOn6p51kC/jvApX/kRAPpK95U7w=";
|
||||
rev = "30871d621fa6e732f07bd33d4112b99539974e5f";
|
||||
hash = "sha256-WcycWbzKug8vUfNnUDhvgmj1kUCpT1P1YJBfdIC1H9g=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
|
@ -26,9 +27,14 @@ in python3.pkgs.buildPythonPackage rec {
|
|||
|
||||
patches = [
|
||||
./patches/pyproject.patch
|
||||
./patches/tasks.patch
|
||||
./patches/manage.patch
|
||||
./patches/exercises-no-gifs.patch
|
||||
|
||||
# adds support for proxy auth header
|
||||
(fetchpatch {
|
||||
url = "https://github.com/wger-project/wger/pull/1859/commits/d46d469fa802890d7162b07c098802810fc8417c.patch";
|
||||
sha256 = "sha256-D+3FmiSokJe9iSJz7ZbRzS+kuP3yV64XhKnQ4Oh5x8c=";
|
||||
})
|
||||
];
|
||||
|
||||
# dependencies = with python3.pkgs; [
|
||||
|
@ -86,6 +92,8 @@ in python3.pkgs.buildPythonPackage rec {
|
|||
# fixup compressed files
|
||||
postBuild = let
|
||||
staticSettings = writeText "static_settings.py" ''
|
||||
import os
|
||||
|
||||
DEBUG = False
|
||||
STATIC_ROOT = os.environ["static"]
|
||||
COMPRESS_OFFLINE = True
|
||||
|
@ -97,7 +105,7 @@ in python3.pkgs.buildPythonPackage rec {
|
|||
# cp -a ${frontend}/static/yarn $out/${python3.sitePackages}/wger/core/static
|
||||
cp -a ${frontend}/static/yarn wger/core/static
|
||||
|
||||
python3 -m wger.tasks create-settings -s $PWD/tmp_settings.py
|
||||
python3 -m wger create-settings -s $PWD/tmp_settings.py
|
||||
cat ${staticSettings} >> $PWD/tmp_settings.py
|
||||
mkdir tmpstatic
|
||||
pushd tmpstatic
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue