1
Fork 0

pkgs: move to overlay

This commit is contained in:
Motiejus Jakštys 2024-01-20 06:31:40 +02:00
parent 4c38af874c
commit 10d634cdc0
4 changed files with 24 additions and 27 deletions

View File

@ -36,8 +36,9 @@
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import ./pkgs.nix {
inherit nixpkgs system geoip2-tarball;
pkgs = import nixpkgs {
inherit system;
overlays = import ./overlays.nix geoip2-tarball;
};
in {
packages = {

View File

@ -7,8 +7,10 @@
pkgs,
...
}: let
inherit (pkgs.stdenv.hostPlatform) system;
pkgs1 = import ../../pkgs.nix {inherit nixpkgs system geoip2-tarball;};
pkgs1 = import nixpkgs {
inherit (pkgs.stdenv.hostPlatform) system;
overlays = import ../../overlays.nix geoip2-tarball;
};
in {
options.e11sync = with lib.types; {
enable = lib.mkEnableOption "Enable e11sync";

17
overlays.nix Normal file
View File

@ -0,0 +1,17 @@
# If you consider exposing this overlay to the users, remove
# django overwrite from here.
geoip2-tarball: [
(_: super: {
python3 = super.python3.override {
packageOverrides = _: python-super: {
django = python-super.django_5;
};
};
geoip-mmdb = super.callPackage ./pkgs/geoip-mmdb.nix {
inherit geoip2-tarball;
};
e11sync-static = super.callPackage ./pkgs/e11sync-static.nix {};
e11sync-frontend = super.callPackage ./pkgs/e11sync-frontend.nix {};
e11sync-backend = super.callPackage ./pkgs/e11sync-backend.nix {};
})
]

View File

@ -1,23 +0,0 @@
{
nixpkgs,
system,
geoip2-tarball,
}:
import nixpkgs {
inherit system;
overlays = [
(_: super: {
python3 = super.python3.override {
packageOverrides = _: python-super: {
django = python-super.django_5;
};
};
geoip-mmdb = super.callPackage ./pkgs/geoip-mmdb.nix {
inherit geoip2-tarball;
};
e11sync-static = super.callPackage ./pkgs/e11sync-static.nix {};
e11sync-frontend = super.callPackage ./pkgs/e11sync-frontend.nix {};
e11sync-backend = super.callPackage ./pkgs/e11sync-backend.nix {};
})
];
}