Add initial support for building with extensions
This commit is contained in:
+9
-6
@@ -13,9 +13,10 @@
|
||||
zlib,
|
||||
icu,
|
||||
|
||||
amalgamate,
|
||||
features,
|
||||
featureFlags,
|
||||
amalgamate ? true,
|
||||
coreInitExt ? null,
|
||||
features ? { },
|
||||
featureFlags ? [ ],
|
||||
enableInteractive ? false,
|
||||
|
||||
...
|
||||
@@ -54,13 +55,15 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"--${if static then "disable" else "enable"}-shared"
|
||||
"--${if static then "enable" else "disable"}-static"
|
||||
"--${if amalgamate then "enable" else "disable"}-amalgamation"
|
||||
|
||||
] ++ lib.optional features.ENABLE_ICU [
|
||||
"--enable-icu-collations"
|
||||
"--with-icu-config=${lib.getExe' icu.dev "icu-config"}"
|
||||
];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = lib.concatStringsSep " " featureFlags;
|
||||
env.NIX_CFLAGS_LINK = lib.optionalString features.ENABLE_FTS5 "-lm";
|
||||
makeTarget = if static then "lib" else "so";
|
||||
makeFlags = (coreInitExt.passthru.makeFlags or [ ]) ++ map (opt: "OPTIONS+=${lib.escapeShellArg opt}") featureFlags;
|
||||
|
||||
makeTarget = "sqlite3.la";
|
||||
env.NIX_CFLAGS_LINK = lib.optionalString features.ENABLE_FTS5 "-lm";
|
||||
env.NIX_LDFLAGS = lib.concatStringsSep " " (coreInitExt.passthru.extraLDFLAGS or [ ]);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user