diff options
author | Stéphan Kochen <git@stephank.nl> | 2021-05-18 20:41:17 +0200 |
---|---|---|
committer | Stéphan Kochen <git@stephank.nl> | 2021-05-18 21:37:04 +0200 |
commit | 84078e61654db8c204316427322956cd908861fb (patch) | |
tree | bba4e57857b6c4bc62442f3f6181cd51c6770cd1 | |
parent | de8dbb21fbf740927ad2888bac59215a92a64ee0 (diff) | |
download | nixpkgs-84078e61654db8c204316427322956cd908861fb.tar nixpkgs-84078e61654db8c204316427322956cd908861fb.tar.gz nixpkgs-84078e61654db8c204316427322956cd908861fb.tar.bz2 nixpkgs-84078e61654db8c204316427322956cd908861fb.tar.lz nixpkgs-84078e61654db8c204316427322956cd908861fb.tar.xz nixpkgs-84078e61654db8c204316427322956cd908861fb.tar.zst nixpkgs-84078e61654db8c204316427322956cd908861fb.zip |
sqlar: fix darwin build
-rw-r--r-- | pkgs/development/libraries/sqlite/sqlar.nix | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/pkgs/development/libraries/sqlite/sqlar.nix b/pkgs/development/libraries/sqlite/sqlar.nix index 0828f2f4554..9063879b7e3 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; { |