From c2d34ea6376da914096e5000b6c28f75140fd248 Mon Sep 17 00:00:00 2001 From: indyandie <1058837+Indyandie@users.noreply.github.com> Date: Sat, 24 Feb 2024 02:12:51 -0600 Subject: [PATCH] ci: add `nix-shell` --- default.nix | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 default.nix diff --git a/default.nix b/default.nix new file mode 100644 index 00000000..1775fe38 --- /dev/null +++ b/default.nix @@ -0,0 +1,41 @@ +with import { }; + +let + pythonPackages = python3Packages; +in pkgs.mkShell rec { + name = "impurePythonEnv"; + venvDir = "./.venv"; + buildInputs = [ + python310Packages.python + python310Packages.venvShellHook + + # python310Packages.coverage + # python310Packages.python-mimeparse + # python310Packages.python-dateutil + # python310Packages.drf-spectacular + # python310Packages.djangorestframework + # python310Packages.django-redis + # python310Packages.django-cors-headers + + # Required dependancies + taglib + openssl + git + libxml2 + libxslt + libzip + zlib + ]; + + # Run this command, only after creating the virtual environment + postVenvCreation = '' + unset SOURCE_DATE_EPOCH + pip install -r requirements.txt + ''; + + postShellHook = '' + # allow pip to install wheels + unset SOURCE_DATE_EPOCH + ''; + +}