2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, openmp ? null }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "bsc";
|
|
|
|
version = "3.1.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://github.com/IlyaGrebnov/libbsc/archive/${version}.tar.gz";
|
|
|
|
sha256 = "01yhizaf6qjv1plyrx0fcib264maa5qwvgfvvid9rzlzj9fxjib6";
|
|
|
|
};
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin openmp;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
substituteInPlace makefile \
|
|
|
|
--replace 'g++' '$(CXX)'
|
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
makeFlagsArray+=("PREFIX=$out")
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "High performance block-sorting data compression library";
|
|
|
|
homepage = "http://libbsc.com/";
|
|
|
|
# Later commits changed the licence to Apache2 (no release yet, though)
|
|
|
|
license = with licenses; [ lgpl3Plus ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|