about summary refs log tree commit diff
path: root/pkgs/by-name/bs/bsc/package.nix
blob: 03bbb66e5550d4020113f29157cfedebcd4992f1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
  lib,
  stdenv,
  fetchFromGitHub,
  llvmPackages,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "bsc";
  version = "3.3.4";

  src = fetchFromGitHub {
    owner = "IlyaGrebnov";
    repo = "libbsc";
    rev = "refs/tags/v${finalAttrs.version}";
    hash = "sha256-reGg5xvoZBbNFFYPPyT2P1LA7oSCUIm9NIDjXyvkP9Q=";
  };

  enableParallelBuilding = true;

  buildInputs = lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp;

  makeFlags = [
    "CC=$(CXX)"
    "PREFIX=${placeholder "out"}"
  ];

  meta = with lib; {
    description = "High performance block-sorting data compression library";
    homepage = "http://libbsc.com/";
    maintainers = with maintainers; [ sigmanificient ];
    license = lib.licenses.asl20;
    platforms = platforms.unix;
    mainProgram = "bsc";
  };
})