lol
1{ stdenv, fetchFromGitHub, zstd, lz4 }:
2
3stdenv.mkDerivation rec {
4 name = "zstdmt-${version}";
5 version = "0.3";
6
7 src = fetchFromGitHub {
8 sha256 = "17i44kjc612sbs7diim9ih007zp7z9zs3q3yacd6dzlqya5vsp0w";
9 rev = "v${version}";
10 repo = "zstdmt";
11 owner = "mcmilk";
12 };
13
14 setSourceRoot = ''
15 sourceRoot=$(echo */unix)
16 '';
17
18 buildInputs = [
19 zstd lz4
20 ];
21
22 makeFlags = [ "CC=cc" "zstdmt" "lz4mt" ];
23
24 installPhase = ''
25 mkdir -p $out/bin/
26 mv zstdmt lz4mt $out/bin/
27 '';
28
29 meta = with stdenv.lib; {
30 description = "Multithreading Library for LZ4, LZ5 and ZStandard";
31 homepage = https://github.com/mcmilk/zstdmt;
32 license = with licenses; [ bsd2 ];
33
34 platforms = platforms.unix;
35 };
36}