at 23.05-pre 926 B view raw
1{ lib, stdenv, fetchurl, fuse, zlib 2, withFuse ? true }: 3 4stdenv.mkDerivation { 5 pname = "sqlar"; 6 version = "2018-01-07"; 7 8 src = fetchurl { 9 url = "https://www.sqlite.org/sqlar/tarball/4824e73896/sqlar-src-4824e73896.tar.gz"; 10 sha256 = "09pikkbp93gqypn3da9zi0dzc47jyypkwc9vnmfzhmw7kpyv8nm9"; 11 }; 12 13 postPatch = '' 14 substituteInPlace Makefile \ 15 --replace 'gcc' '${stdenv.cc.targetPrefix}cc' 16 ''; 17 18 buildInputs = [ zlib ] 19 ++ lib.optional withFuse fuse; 20 21 buildFlags = [ "CFLAGS=-Wno-error" "sqlar" ] 22 ++ lib.optional withFuse "sqlarfs"; 23 24 installPhase = '' 25 install -D -t $out/bin sqlar 26 '' + lib.optionalString withFuse '' 27 install -D -t $out/bin sqlarfs 28 ''; 29 30 meta = with lib; { 31 homepage = "https://sqlite.org/sqlar"; 32 description = "SQLite Archive utilities"; 33 license = licenses.bsd2; 34 platforms = platforms.all; 35 maintainers = with maintainers; [ dtzWill ]; 36 }; 37}