summaryrefslogtreecommitdiff
path: root/pkgs/development/libraries/sqlite/sqlar.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/sqlite/sqlar.nix')
-rw-r--r--pkgs/development/libraries/sqlite/sqlar.nix18
1 files changed, 14 insertions, 4 deletions
diff --git a/pkgs/development/libraries/sqlite/sqlar.nix b/pkgs/development/libraries/sqlite/sqlar.nix
index 0828f2f45543..9063879b7e37 100644
--- a/pkgs/development/libraries/sqlite/sqlar.nix
+++ b/pkgs/development/libraries/sqlite/sqlar.nix
@@ -1,4 +1,5 @@
-{ lib, stdenv, fetchurl, fuse, zlib }:
+{ lib, stdenv, fetchurl, fuse, zlib
+, withFuse ? true }:
stdenv.mkDerivation {
pname = "sqlar";
@@ -9,12 +10,21 @@ stdenv.mkDerivation {
sha256 = "09pikkbp93gqypn3da9zi0dzc47jyypkwc9vnmfzhmw7kpyv8nm9";
};
- buildInputs = [ fuse zlib ];
+ postPatch = ''
+ substituteInPlace Makefile \
+ --replace 'gcc' '${stdenv.cc.targetPrefix}cc'
+ '';
+
+ buildInputs = [ zlib ]
+ ++ lib.optional withFuse fuse;
- buildFlags = [ "sqlar" "sqlarfs" "CFLAGS=-Wno-error" ];
+ buildFlags = [ "CFLAGS=-Wno-error" "sqlar" ]
+ ++ lib.optional withFuse "sqlarfs";
installPhase = ''
- install -D -t $out/bin sqlar sqlarfs
+ install -D -t $out/bin sqlar
+ '' + lib.optionalString withFuse ''
+ install -D -t $out/bin sqlarfs
'';
meta = with lib; {