nix: reduce closure size of default package in flake.nix
Splitting the executable in a separate output avoids distributing all of the libraries and documentation, which are not needed when just running PostgREST. Reduces closure size from 4.3G to 73.9M for the flake exported packages. Resolves #4149
This commit is contained in:
committed by
Laurence Isla
parent
67bd3526c2
commit
de25b26f3e
@@ -33,8 +33,8 @@
|
||||
in
|
||||
{
|
||||
packages = genSystems (attrs: {
|
||||
default = attrs.postgrestPackage;
|
||||
profiled = attrs.postgrestProfiled;
|
||||
default = attrs.postgrestPackage.bin;
|
||||
profiled = attrs.postgrestProfiled.bin;
|
||||
} // nixpkgs.lib.optionalAttrs (attrs ? postgrestStatic) {
|
||||
static = attrs.postgrestStatic;
|
||||
});
|
||||
@@ -42,7 +42,7 @@
|
||||
apps = genSystems (attrs: {
|
||||
default = {
|
||||
type = "app";
|
||||
program = "${attrs.postgrestStatic or attrs.postgrestPackage}/bin/postgrest";
|
||||
program = "${attrs.postgrestStatic or attrs.postgrestPackage.bin}/bin/postgrest";
|
||||
meta.description = "REST API for any Postgres database";
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user