bsc: cleanup

This commit is contained in:
Sandro Jäckel 2021-07-21 13:36:12 +02:00
parent 0a97ad6827
commit eaf2c4a2dd
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5

View file

@ -1,30 +1,31 @@
{ lib, stdenv, fetchurl, openmp ? null }:
{ lib, stdenv, fetchFromGitHub, openmp }:
stdenv.mkDerivation rec {
pname = "bsc";
version = "3.1.0";
src = fetchurl {
url = "https://github.com/IlyaGrebnov/libbsc/archive/${version}.tar.gz";
sha256 = "01yhizaf6qjv1plyrx0fcib264maa5qwvgfvvid9rzlzj9fxjib6";
src = fetchFromGitHub {
owner = "IlyaGrebnov";
repo = "libbsc";
rev = version;
sha256 = "0c0jmirh9y23kyi1jnrm13sa3xsjn54jazfr84ag45pai279fciz";
};
enableParallelBuilding = true;
buildInputs = lib.optional stdenv.isDarwin openmp;
prePatch = ''
postPatch = ''
substituteInPlace makefile \
--replace 'g++' '$(CXX)'
'';
preInstall = ''
makeFlagsArray+=("PREFIX=$out")
'';
makeFlags = [ "PREFIX=$(out)" ];
meta = with lib; {
description = "High performance block-sorting data compression library";
homepage = "http://libbsc.com/";
maintainers = with maintainers; [ ];
# Later commits changed the licence to Apache2 (no release yet, though)
license = with licenses; [ lgpl3Plus ];
platforms = platforms.unix;