commit 994a4ad18be689aad8571f913a2829c122436375 (tree)
parent bbac4f96b478c83d55fbbe3fd18c98f878d56b90
Author: Motiejus Jakštys <motiejus@jakstys.lt>
Date: Tue, 16 Jan 2024 00:34:11 +0200
django_5: override globally
Diffstat:
4 files changed, 21 insertions(+), 22 deletions(-)
diff --git a/flake.nix b/flake.nix
@@ -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;
diff --git a/modules/e11sync/default.nix b/modules/e11sync/default.nix
@@ -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
];
};
diff --git a/pkgs/e11sync-backend.nix b/pkgs/e11sync-backend.nix
@@ -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
diff --git a/pkgs/e11sync-static.nix b/pkgs/e11sync-static.nix
@@ -11,7 +11,7 @@ stdenv.mkDerivation {
name = "e11sync-static";
src = ../app;
nativeBuildInputs = [
- python3Packages.django_5
+ python3Packages.django
python3Packages.django-compressor
dart-sass
];