Merge pull request #228753 from K900/upd8n
libmongocrypt: init, n8n: update
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ pkgs, nodejs_16, stdenv, lib, nixosTests }:
|
||||
{ pkgs, stdenv, lib, nixosTests }:
|
||||
|
||||
let
|
||||
nodePackages = import ./node-composition.nix {
|
||||
@@ -13,6 +13,7 @@ nodePackages.n8n.override {
|
||||
|
||||
buildInputs = [
|
||||
pkgs.postgresql
|
||||
pkgs.libmongocrypt
|
||||
];
|
||||
|
||||
# Oracle's official package on npm is binary only (WHY?!) and doesn't provide binaries for aarch64.
|
||||
@@ -24,6 +25,9 @@ nodePackages.n8n.override {
|
||||
rm -rf node_modules/oracledb
|
||||
'';
|
||||
|
||||
# makes libmongocrypt bindings not look for static libraries in completely wrong places
|
||||
BUILD_TYPE = "dynamic";
|
||||
|
||||
dontNpmInstall = true;
|
||||
|
||||
passthru = {
|
||||
|
||||
@@ -530,12 +530,15 @@ let
|
||||
then
|
||||
ln -s $out/lib/node_modules/.bin $out/bin
|
||||
|
||||
# Patch the shebang lines of all the executables
|
||||
# Fixup all executables
|
||||
ls $out/bin/* | while read i
|
||||
do
|
||||
file="$(readlink -f "$i")"
|
||||
chmod u+rwx "$file"
|
||||
patchShebangs "$file"
|
||||
if isScript "$file"
|
||||
then
|
||||
sed -i 's/\r$//' "$file" # convert crlf to lf
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
+2703
-1091
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,44 @@
|
||||
{ stdenv, lib, fetchFromGitHub, fetchpatch, cmake, pkg-config, mongoc, openssl }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libmongocrypt";
|
||||
version = "1.7.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mongodb";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-I4KG2BHAovin9EaF8lNzJzucARvi0Qptz5Y9gTt3WkE=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# fix pkg-config files
|
||||
# submitted upstream: https://github.com/mongodb/libmongocrypt/pull/634
|
||||
(fetchpatch {
|
||||
url = "https://github.com/mongodb/libmongocrypt/commit/5514cf0a366c4d0dc1b0f2a62201f0f1161054da.diff";
|
||||
hash = "sha256-eMSn6MRnc3yKfU2u/Bg3juWiupDzY1DUGi1/HSRftIs=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config ];
|
||||
buildInputs = [ mongoc openssl ];
|
||||
|
||||
cmakeFlags = [
|
||||
# all three of these are required to use system libbson
|
||||
"-DUSE_SHARED_LIBBSON=ON"
|
||||
"-DMONGOCRYPT_MONGOC_DIR=USE-SYSTEM"
|
||||
"-DENABLE_ONLINE_TESTS=OFF"
|
||||
|
||||
# this pulls in a library we don't have
|
||||
"-DMONGOCRYPT_ENABLE_DECIMAL128=OFF"
|
||||
|
||||
# this avoids a dependency on Python
|
||||
"-DBUILD_VERSION=${version}"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Required C library for client-side and queryable encryption in MongoDB";
|
||||
homepage = "https://github.com/mongodb/libmongocrypt";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
@@ -9666,6 +9666,8 @@ with pkgs;
|
||||
|
||||
libmongo-client = callPackage ../development/libraries/libmongo-client { };
|
||||
|
||||
libmongocrypt = callPackage ../development/libraries/libmongocrypt { };
|
||||
|
||||
libmesode = callPackage ../development/libraries/libmesode { };
|
||||
|
||||
libmsym = callPackage ../development/libraries/science/chemistry/libmsym { };
|
||||
|
||||
Reference in New Issue
Block a user