2021-05-18 18:41:17 +00:00
|
|
|
{ lib, stdenv, fetchurl, fuse, zlib
|
|
|
|
, withFuse ? true }:
|
2018-05-17 02:42:14 +00:00
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "sqlar";
|
2018-05-17 02:42:14 +00:00
|
|
|
version = "2018-01-07";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://www.sqlite.org/sqlar/tarball/4824e73896/sqlar-src-4824e73896.tar.gz";
|
|
|
|
sha256 = "09pikkbp93gqypn3da9zi0dzc47jyypkwc9vnmfzhmw7kpyv8nm9";
|
|
|
|
};
|
|
|
|
|
2021-05-18 18:41:17 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace 'gcc' '${stdenv.cc.targetPrefix}cc'
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ zlib ]
|
|
|
|
++ lib.optional withFuse fuse;
|
2018-05-17 02:42:14 +00:00
|
|
|
|
2021-05-18 18:41:17 +00:00
|
|
|
buildFlags = [ "CFLAGS=-Wno-error" "sqlar" ]
|
|
|
|
++ lib.optional withFuse "sqlarfs";
|
2018-05-17 02:42:14 +00:00
|
|
|
|
|
|
|
installPhase = ''
|
2021-05-18 18:41:17 +00:00
|
|
|
install -D -t $out/bin sqlar
|
|
|
|
'' + lib.optionalString withFuse ''
|
|
|
|
install -D -t $out/bin sqlarfs
|
2018-05-17 02:42:14 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://sqlite.org/sqlar";
|
2018-05-17 02:42:14 +00:00
|
|
|
description = "SQLite Archive utilities";
|
2018-08-11 12:32:05 +00:00
|
|
|
license = licenses.bsd2;
|
2018-05-17 02:42:14 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ dtzWill ];
|
|
|
|
};
|
|
|
|
}
|