pretix: fix pretix-manage runserver by using makeWrapper
I noticed that running pretix runserver does not work:
% nix run .#pretix -- runserver localhost:8001
File "/nix/store/ack7nv8s8g5lcmypr9ayb5291n0yk4ad-pretix-2025.5.0/bin/pretix-manage", line 2
PATH=${PATH:+':'$PATH':'}
^
SyntaxError: invalid syntax
I don’t know exactly how or why I get a Python error when
bin/pretix-manage clearly has a Bash shebang, but I looked
at other django web apps in nixpkgs and noticed that they
were using a different way to create the manage.py wrapper.
And indeed, when using makeWrapper, runserver starts working.
This commit is contained in:
@@ -222,7 +222,9 @@ python.pkgs.buildPythonApplication rec {
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/bin
|
||||
cp ./src/manage.py $out/bin/pretix-manage
|
||||
cp ./src/manage.py $out/${python.sitePackages}/pretix/manage.py
|
||||
makeWrapper $out/${python.sitePackages}/pretix/manage.py $out/bin/pretix-manage \
|
||||
--prefix PYTHONPATH : "$PYTHONPATH"
|
||||
|
||||
# Trim packages size
|
||||
rm -rfv $out/${python.sitePackages}/pretix/static.dist/node_prefix
|
||||
|
||||
Reference in New Issue
Block a user