Advertisement
Guest User

Untitled

a guest
Mar 28th, 2024
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. {
  2. inputs = {
  3. # Update to NixOS 24.05 as soon it is released
  4. nixpkgs.url = "nixpkgs/master";
  5. # Required for multi platform support
  6. flake-utils.url = "github:numtide/flake-utils";
  7. };
  8.  
  9. outputs = { self, nixpkgs, flake-utils }:
  10. flake-utils.lib.eachDefaultSystem (system:
  11. let
  12. pkgs = import nixpkgs { inherit system; };
  13.  
  14. start =
  15. pkgs.writeShellScriptBin "start" ''
  16. set -e
  17. ${pkgs.python3}/bin/python manage.py makemigrations
  18. ${pkgs.python3}/bin/python manage.py migrate
  19. ${pkgs.python3}/bin/python manage.py runserver
  20. '';
  21. in
  22. {
  23. devShell = pkgs.mkShell {
  24. packages = with pkgs; with python3Packages; [
  25. python3
  26. django_5
  27. dj-database-url
  28. whitenoise
  29. django-widget-tweaks
  30. setuptools # Required by widget-tweaks
  31. django-login-required-middleware
  32. django_colorful
  33. django-crispy-forms
  34. django-crispy-bootstrap5
  35. django-import-export
  36. requests
  37. python-dotenv
  38. django-ckeditor
  39. dateutil
  40. pymemcache
  41. nodejs
  42. pre-commit
  43. ];
  44. shellHook = ''
  45. pre-commit install
  46. '';
  47. };
  48.  
  49. packages = { inherit start; };
  50. defaultPackage = start;
  51. });
  52. }
  53.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement