aboutsummaryrefslogtreecommitdiff
path: root/nix/compile.nix
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-09-06 16:41:58 +0200
committerAlex Auvolat <alex@adnab.me>2022-09-06 16:41:58 +0200
commit7de53a4d66c71d9b5f22662f7bd473d055aa1c1f (patch)
tree425a4370294979e7d35952c1366daa80a610ebb6 /nix/compile.nix
parent8d77a76df1c3c20300b0b4fe2671cd74c82606e2 (diff)
downloadgarage-7de53a4d66c71d9b5f22662f7bd473d055aa1c1f.tar.gz
garage-7de53a4d66c71d9b5f22662f7bd473d055aa1c1f.zip
Force disable pkg-config for libsodum-sys and libzstd-sys
Diffstat (limited to 'nix/compile.nix')
-rw-r--r--nix/compile.nix18
1 files changed, 18 insertions, 0 deletions
diff --git a/nix/compile.nix b/nix/compile.nix
index 5707ed41..450b6398 100644
--- a/nix/compile.nix
+++ b/nix/compile.nix
@@ -118,6 +118,10 @@ let
But we want to ship these additional features when we release Garage.
In the end, we chose to exclude all features from debug builds while putting (all of) them in the release builds.
Currently, the only feature of Garage is kubernetes-discovery from the garage_rpc crate.
+
+ [5] We don't want libsodium-sys and zstd-sys to try to use pkgconfig to build against a system library.
+ However the features to do so get activated for some reason (due to a bug in cargo2nix?),
+ so disable them manually here.
*/
(pkgs.rustBuilder.rustLib.makeOverride {
name = "garage";
@@ -183,6 +187,20 @@ let
name = "k2v-client";
overrideAttrs = drv: { /* [1] */ setBuildEnv = (buildEnv drv); };
})
+
+ (pkgs.rustBuilder.rustLib.makeOverride {
+ name = "libsodium-sys";
+ overrideArgs = old: {
+ features = [ ]; /* [5] */
+ };
+ })
+
+ (pkgs.rustBuilder.rustLib.makeOverride {
+ name = "zstd-sys";
+ overrideArgs = old: {
+ features = [ ]; /* [5] */
+ };
+ })
];
packageFun = import ../Cargo.nix;