geoip-archive: move to it's own package
This commit is contained in:
parent
dc72e8a2a4
commit
27e0979c86
23
flake.nix
23
flake.nix
|
@ -31,24 +31,18 @@
|
|||
}:
|
||||
flake-utils.lib.eachDefaultSystem (system: let
|
||||
pkgs = import nixpkgs {inherit system;};
|
||||
|
||||
geoip-archive = pkgs.stdenv.mkDerivation {
|
||||
name = "geoip-archive";
|
||||
srcs = [geoip2-asn geoip2-city geoip2-country];
|
||||
dontUnpack = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp ${geoip2-asn} $out/GeoLite2-ASN.mmdb
|
||||
cp ${geoip2-city} $out/GeoLite2-City.mmdb
|
||||
cp ${geoip2-country} $out/GeoLite2-Country.mmdb
|
||||
'';
|
||||
};
|
||||
in rec {
|
||||
packages.geoip-archive = pkgs.callPackage ./pkgs/geoip-archive.nix {
|
||||
inherit geoip2-asn geoip2-city geoip2-country;
|
||||
};
|
||||
|
||||
packages.e11sync-static = pkgs.callPackage ./pkgs/e11sync-static.nix {
|
||||
inherit self;
|
||||
};
|
||||
|
||||
packages.e11sync = pkgs.callPackage ./pkgs/e11sync.nix {
|
||||
inherit self geoip-archive;
|
||||
inherit self;
|
||||
geoip-archive = packages.geoip-archive;
|
||||
};
|
||||
|
||||
checks.e11sync = packages.e11sync.passthru.tests.simple;
|
||||
|
@ -65,7 +59,6 @@
|
|||
};
|
||||
|
||||
devShells.default = pkgs.mkShellNoCC {
|
||||
|
||||
packages = with pkgs; [
|
||||
python3Packages.django-debug-toolbar
|
||||
python3Packages.django_5
|
||||
|
@ -74,7 +67,7 @@
|
|||
libmaxminddb
|
||||
dart-sass
|
||||
];
|
||||
GEOIP_PATH = "${geoip-archive}";
|
||||
GEOIP_PATH = "${packages.geoip-archive}";
|
||||
E11SYNC_DEBUG = "1";
|
||||
LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
|
||||
};
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
stdenv,
|
||||
geoip2-asn,
|
||||
geoip2-city,
|
||||
geoip2-country,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "geoip-archive";
|
||||
srcs = [geoip2-asn geoip2-city geoip2-country];
|
||||
dontUnpack = true;
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp ${geoip2-asn} $out/GeoLite2-ASN.mmdb
|
||||
cp ${geoip2-city} $out/GeoLite2-City.mmdb
|
||||
cp ${geoip2-country} $out/GeoLite2-Country.mmdb
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue