pkgs: simplify
This commit is contained in:
parent
d54da85c56
commit
a01d07c533
20
flake.nix
20
flake.nix
@ -94,19 +94,13 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
devShells.default = pkgs.mkShellNoCC {
|
devShells.default = pkgs.mkShellNoCC {
|
||||||
packages = with pkgs; [
|
packages = [
|
||||||
(python3.withPackages
|
(
|
||||||
(ps: [
|
pkgs.python3.withPackages
|
||||||
ps.django
|
(p: with p; [django geoip2 django-debug-toolbar flake8 autopep8])
|
||||||
ps.geoip2
|
)
|
||||||
|
pkgs.libmaxminddb
|
||||||
ps.django-debug-toolbar
|
pkgs.dart-sass
|
||||||
ps.flake8
|
|
||||||
# TODO: vim integration via EXITINT? See make check
|
|
||||||
ps.autopep8
|
|
||||||
]))
|
|
||||||
libmaxminddb
|
|
||||||
dart-sass
|
|
||||||
];
|
];
|
||||||
GEOIP_PATH = "${pkgs.geoip-mmdb}";
|
GEOIP_PATH = "${pkgs.geoip-mmdb}";
|
||||||
E11SYNC_DEBUG = "1";
|
E11SYNC_DEBUG = "1";
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
makeWrapper,
|
makeWrapper,
|
||||||
python3,
|
python3,
|
||||||
libmaxminddb,
|
libmaxminddb,
|
||||||
dart-sass,
|
|
||||||
uwsgi,
|
uwsgi,
|
||||||
backendPort ? 8002,
|
backendPort ? 8002,
|
||||||
databasePath ? null,
|
databasePath ? null,
|
||||||
@ -13,12 +12,7 @@
|
|||||||
e11sync-static,
|
e11sync-static,
|
||||||
}: let
|
}: let
|
||||||
uwsgi-python = uwsgi.override {plugins = ["python3"];};
|
uwsgi-python = uwsgi.override {plugins = ["python3"];};
|
||||||
pythonEnv =
|
pythonEnv = python3.withPackages (ps: [ps.django ps.geoip2]);
|
||||||
python3.withPackages
|
|
||||||
(ps: [
|
|
||||||
ps.django
|
|
||||||
ps.geoip2
|
|
||||||
]);
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "e11sync-backend";
|
name = "e11sync-backend";
|
||||||
@ -56,10 +50,7 @@ in
|
|||||||
passthru.tests.unit =
|
passthru.tests.unit =
|
||||||
runCommand "e11sync-test" {
|
runCommand "e11sync-test" {
|
||||||
srcs = ../app;
|
srcs = ../app;
|
||||||
buildInputs = [
|
buildInputs = [pythonEnv];
|
||||||
pythonEnv
|
|
||||||
dart-sass
|
|
||||||
];
|
|
||||||
} ''
|
} ''
|
||||||
unpackPhase
|
unpackPhase
|
||||||
patchShebangs --build app/manage.py
|
patchShebangs --build app/manage.py
|
||||||
|
@ -24,8 +24,7 @@
|
|||||||
|
|
||||||
# remove unversioned files
|
# remove unversioned files
|
||||||
(cd app/_static;
|
(cd app/_static;
|
||||||
${jq}/bin/jq -r '.paths | keys[]' staticfiles.json | \
|
${jq}/bin/jq -r '.paths | keys[]' staticfiles.json | xargs rm
|
||||||
xargs rm
|
|
||||||
)
|
)
|
||||||
|
|
||||||
find app/_static \
|
find app/_static \
|
||||||
|
Loading…
Reference in New Issue
Block a user