1
Fork 0

django_5: override globally

This commit is contained in:
Motiejus Jakštys 2024-01-16 00:34:11 +02:00
parent bbac4f96b4
commit 994a4ad18b
4 changed files with 21 additions and 22 deletions

View File

@ -36,7 +36,18 @@
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
pkgs = import nixpkgs {
inherit system;
overlays = [
(_: super: {
python3 = super.python3.override {
packageOverrides = _: python-super: {
django = python-super.django_5;
};
};
})
];
};
geoip-mmdb = pkgs.callPackage ./pkgs/geoip-mmdb.nix {
inherit geoip2-tarball;

View File

@ -1,7 +1,6 @@
e11sync-backend: {
config,
lib,
pkgs,
...
}: {
options.e11sync = with lib.types; {
@ -11,8 +10,6 @@ e11sync-backend: {
config = lib.mkIf config.e11sync.enable {
environment.systemPackages = [
pkgs.python3
pkgs.python3Packages.django_5
e11sync-backend
];
};

View File

@ -14,22 +14,13 @@
}:
stdenv.mkDerivation {
name = "e11sync";
propagatedBuildInputs = let
pythonEnv =
(python3.override
{
packageOverrides = _: super: {
django = super.django_5;
};
})
.withPackages (ps:
with ps; [
django
django-compressor
geoip2
]);
in [
pythonEnv
propagatedBuildInputs = [
(python3.withPackages
(ps: [
ps.django
ps.django-compressor
ps.geoip2
]))
libmaxminddb
];
nativeBuildInputs = [makeWrapper];
@ -59,7 +50,7 @@ stdenv.mkDerivation {
runCommand "e11sync-test" {
src = ../app;
buildInputs = [
python3Packages.django_5
python3Packages.django
python3Packages.django-compressor
python3Packages.geoip2
dart-sass

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation {
name = "e11sync-static";
src = ../app;
nativeBuildInputs = [
python3Packages.django_5
python3Packages.django
python3Packages.django-compressor
dart-sass
];