51 lines
991 B
Nix
51 lines
991 B
Nix
|
{ lib
|
||
|
, buildPythonApplication
|
||
|
, makePythonPath
|
||
|
, fetchFromGitHub
|
||
|
, python3
|
||
|
, hatchling
|
||
|
, django_4
|
||
|
, django-bootstrap5
|
||
|
, django-admin-autocomplete-filter
|
||
|
, django-verify-email
|
||
|
}:
|
||
|
|
||
|
buildPythonApplication rec {
|
||
|
pname = "nerd";
|
||
|
version = "0.0.1";
|
||
|
|
||
|
src = fetchFromGitHub {
|
||
|
owner = "dect-e";
|
||
|
repo = pname;
|
||
|
#rev = "v${version}";
|
||
|
rev = "8b8becaeb9d77c3ff2c5dadb1d5be6d66b6ed5f2";
|
||
|
sha256 = "sha256-R2kOECPtfTTnbqjujGR1AeNGyXNswqC7UJtQu+W4pXo=";
|
||
|
};
|
||
|
|
||
|
sourceRoot = "source/src";
|
||
|
|
||
|
format = "pyproject";
|
||
|
|
||
|
buildInputs = [ python3 hatchling ];
|
||
|
propagatedBuildInputs = [
|
||
|
django_4
|
||
|
django-bootstrap5
|
||
|
django-admin-autocomplete-filter
|
||
|
django-verify-email
|
||
|
];
|
||
|
|
||
|
postInstall = ''
|
||
|
python ./manage.py collectstatic
|
||
|
|
||
|
mkdir -p $out/var/lib/nerd
|
||
|
cp -r static $out/var/lib/nerd/
|
||
|
'';
|
||
|
|
||
|
passthru = {
|
||
|
# PYTHONPATH of all dependencies used by the package
|
||
|
pythonPath = python3.pkgs.makePythonPath propagatedBuildInputs;
|
||
|
};
|
||
|
|
||
|
doCheck = false;
|
||
|
}
|