1

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 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 { geoip-mmdb = pkgs.callPackage ./pkgs/geoip-mmdb.nix {
inherit geoip2-tarball; inherit geoip2-tarball;

View File

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

View File

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

View File

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