git.iko.soy/typeable/nixpkgs
on master help sign in
sqlar: fix darwin build
commit84078e61654db8c204316427322956cd908861fb authorStéphan Kochen <git@stephank.nl> dateTue 18 May 2021, 20:41 (6 years ago) parentde8dbb2
1 file changed+14−4
pkgs/development/libraries/sqlite/sqlar.nix+14−4
pkgs/development/libraries/sqlite/sqlar.nix+14−4
@@ -1,4 +1,5 @@
1−{ lib, stdenv, fetchurl, fuse, zlib }:
1+{ lib, stdenv, fetchurl, fuse, zlib
2+, withFuse ? true }:
23
34stdenv.mkDerivation {
45 pname = "sqlar";
@@ -9,12 +10,21 @@ stdenv.mkDerivation {
910 sha256 = "09pikkbp93gqypn3da9zi0dzc47jyypkwc9vnmfzhmw7kpyv8nm9";
1011 };
1112
12− buildInputs = [ fuse zlib ];
13+ postPatch = ''
14+ substituteInPlace Makefile \
15+ --replace 'gcc' '${stdenv.cc.targetPrefix}cc'
16+ '';
17+
18+ buildInputs = [ zlib ]
19+ ++ lib.optional withFuse fuse;
1320
14− buildFlags = [ "sqlar" "sqlarfs" "CFLAGS=-Wno-error" ];
21+ buildFlags = [ "CFLAGS=-Wno-error" "sqlar" ]
22+ ++ lib.optional withFuse "sqlarfs";
1523
1624 installPhase = ''
17− install -D -t $out/bin sqlar sqlarfs
25+ install -D -t $out/bin sqlar
26+ '' + lib.optionalString withFuse ''
27+ install -D -t $out/bin sqlarfs
1828 '';
1929
2030 meta = with lib; {