flake.nix: avoid rec
This commit is contained in:
parent
446413083a
commit
75fb04d227
29
flake.nix
29
flake.nix
@ -31,31 +31,32 @@
|
|||||||
}:
|
}:
|
||||||
flake-utils.lib.eachDefaultSystem (system: let
|
flake-utils.lib.eachDefaultSystem (system: let
|
||||||
pkgs = import nixpkgs {inherit system;};
|
pkgs = import nixpkgs {inherit system;};
|
||||||
in rec {
|
|
||||||
packages.geoip-archive = pkgs.callPackage ./pkgs/geoip-archive.nix {
|
geoip-archive = pkgs.callPackage ./pkgs/geoip-archive.nix {
|
||||||
inherit geoip2-asn geoip2-city geoip2-country;
|
inherit geoip2-asn geoip2-city geoip2-country;
|
||||||
};
|
};
|
||||||
|
|
||||||
packages.e11sync-static = pkgs.callPackage ./pkgs/e11sync-static.nix {
|
e11sync-static = pkgs.callPackage ./pkgs/e11sync-static.nix {
|
||||||
inherit self;
|
inherit self;
|
||||||
};
|
};
|
||||||
|
|
||||||
packages.e11sync = pkgs.callPackage ./pkgs/e11sync.nix {
|
e11sync = pkgs.callPackage ./pkgs/e11sync.nix {
|
||||||
inherit self;
|
inherit self geoip-archive;
|
||||||
inherit (packages) geoip-archive;
|
|
||||||
};
|
};
|
||||||
|
in {
|
||||||
|
packages.geoip-archive = geoip-archive;
|
||||||
|
packages.e11sync-static = e11sync-static;
|
||||||
|
packages.e11sync = e11sync;
|
||||||
|
|
||||||
checks.e11sync-unit = packages.e11sync.passthru.tests.unit;
|
checks.e11sync-unit = e11sync.passthru.tests.unit;
|
||||||
|
|
||||||
apps.e11sync-gunicorn = {
|
apps.e11sync-gunicorn = {
|
||||||
type = "app";
|
type = "app";
|
||||||
name = "e11sync-gunicorn";
|
name = "e11sync-gunicorn";
|
||||||
program = let
|
program = toString (pkgs.writeShellScript "wrapper" ''
|
||||||
wrapper = pkgs.writeShellScript "wrapper" ''
|
export E11SYNC_DATABASE_PATH=$PWD/db.sqlite3
|
||||||
export E11SYNC_DATABASE_PATH=$PWD/db.sqlite3
|
exec ${e11sync}/bin/e11sync-gunicorn
|
||||||
exec ${packages.e11sync}/bin/e11sync-gunicorn
|
'');
|
||||||
'';
|
|
||||||
in "${wrapper}";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.default = pkgs.mkShellNoCC {
|
devShells.default = pkgs.mkShellNoCC {
|
||||||
@ -67,7 +68,7 @@
|
|||||||
libmaxminddb
|
libmaxminddb
|
||||||
dart-sass
|
dart-sass
|
||||||
];
|
];
|
||||||
GEOIP_PATH = "${packages.geoip-archive}";
|
GEOIP_PATH = "${geoip-archive}";
|
||||||
E11SYNC_DEBUG = "1";
|
E11SYNC_DEBUG = "1";
|
||||||
LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
|
LOCALE_ARCHIVE = "${pkgs.glibcLocales}/lib/locale/locale-archive";
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user