Add static build
This commit is contained in:
@@ -35,8 +35,9 @@
|
||||
enableInteractive;
|
||||
};
|
||||
in {
|
||||
# "sqlite-amalgamation${result.suffix}" = result.amalgamation;
|
||||
"sqlite-amalgamation${result.suffix}" = result.amalgamation;
|
||||
"sqlite${result.suffix}" = result.sqlite;
|
||||
"sqlite-static${result.suffix}" = result.sqlite-static;
|
||||
}) productVars));
|
||||
};
|
||||
}
|
||||
|
||||
+7
-1
@@ -61,9 +61,15 @@ in {
|
||||
inherit (pkgs.sqlite) version src;
|
||||
inherit amalgamate;
|
||||
nameSuffix = suffix;
|
||||
static = false;
|
||||
} // config);
|
||||
|
||||
# "sqlite-static"
|
||||
sqlite-static = pkgs.callPackage ./sqlite.nix ({
|
||||
inherit (pkgs.sqlite) version src;
|
||||
inherit amalgamate;
|
||||
nameSuffix = suffix;
|
||||
static = true;
|
||||
} // config);
|
||||
|
||||
# "sqlite-cli"
|
||||
} // lib.optionalAttrs amalgamate {
|
||||
|
||||
+6
-3
@@ -1,6 +1,8 @@
|
||||
{
|
||||
lib,
|
||||
|
||||
static ? false,
|
||||
|
||||
src,
|
||||
version,
|
||||
nameSuffix,
|
||||
@@ -45,11 +47,12 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
configureFlags = [
|
||||
"--bindir=/tmp"
|
||||
"--mandir=/tmp"
|
||||
"--includedir=${placeholder "out"}/include"
|
||||
"--libdir=${placeholder "out"}/lib"
|
||||
|
||||
"--enable-shared"
|
||||
"--disable-static"
|
||||
"--${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"
|
||||
@@ -59,5 +62,5 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
env.NIX_CFLAGS_COMPILE = lib.concatStringsSep " " featureFlags;
|
||||
env.NIX_CFLAGS_LINK = lib.optionalString features.ENABLE_FTS5 "-lm";
|
||||
|
||||
makeTarget = "sqlite3.so";
|
||||
makeTarget = "sqlite3.la";
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user