rubyPackages.sqlite3: fix building for >= 1.5.0

This commit is contained in:
Stanisław Pitucha 2022-09-11 12:49:42 +10:00 committed by Bjørn Forsman
parent 224da23db2
commit 3e2341b082

View file

@ -639,7 +639,16 @@ in
buildInputs = [ args.snappy ];
};
sqlite3 = attrs: {
sqlite3 = attrs: if lib.versionAtLeast attrs.version "1.5.0"
then {
nativeBuildInputs = [ pkg-config sqlite.dev ];
buildInputs = [ sqlite.out ];
buildFlags = [
"--enable-system-libraries"
"--with-pkg-config=${pkg-config}/bin/pkg-config"
];
}
else {
buildFlags = [
"--with-sqlite3-include=${sqlite.dev}/include"
"--with-sqlite3-lib=${sqlite.out}/lib"