aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-06-06 22:02:09 +0200
committerAlex Auvolat <alex@adnab.me>2022-06-06 22:02:09 +0200
commit35544cac3994449b331a085d957cc476b4f2e79c (patch)
treede2d9174d196b6d6dcc35b259edbf3ee5dab812d
parente42c7bed386f604b5beeb0a4330defacff059233 (diff)
downloadgarage-35544cac3994449b331a085d957cc476b4f2e79c.tar.gz
garage-35544cac3994449b331a085d957cc476b4f2e79c.zip
Add nix overrides to include lmdb and sqlite3 libraries
-rw-r--r--default.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index de996ac1..4dc2db2f 100644
--- a/default.nix
+++ b/default.nix
@@ -95,6 +95,25 @@ in let
features = if release then [ "kubernetes-discovery" ] else [];
};
})
+
+ /*
+ We are now depending on sqlite3 and lmdb to provide alternative
+ storage backends for Garage. But these crates don't know what
+ system libraries they need, so we add them here manually:
+ `sqlite3` for `libsqlite3-sys` and `lmdb` for `lmdb-rkv-sys`
+ */
+ (pkgs.rustBuilder.rustLib.makeOverride {
+ name = "libsqlite3-sys";
+ overrideAttrs = drv: {
+ propagatedBuildInputs = drv.propagatedBuildInputs or [ ] ++ [ pkgs.sqlite ];
+ };
+ })
+ (pkgs.rustBuilder.rustLib.makeOverride {
+ name = "lmdb-rkv-sys";
+ overrideAttrs = drv: {
+ propagatedBuildInputs = drv.propagatedBuildInputs or [ ] ++ [ pkgs.lmdb ];
+ };
+ })
];
packageFun = import ./Cargo.nix;