1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 nasm,
7}:
8
9stdenv.mkDerivation (finalAttrs: {
10 pname = "xpar";
11 version = "0.5";
12
13 src = fetchFromGitHub {
14 owner = "kspalaiologos";
15 repo = "xpar";
16 rev = finalAttrs.version;
17 hash = "sha256-DMUDWQqYSQjGxYOpcfwNaaM21avcZ1w3IqEhuOaabrw=";
18 };
19
20 nativeBuildInputs = [
21 autoreconfHook
22 ]
23 ++ lib.optionals stdenv.hostPlatform.isx86_64 [ nasm ];
24
25 configureFlags = [
26 "--disable-arch-native"
27 "--enable-lto"
28 ]
29 ++ lib.optional stdenv.hostPlatform.isx86_64 "--enable-x86-64"
30 ++ lib.optional stdenv.hostPlatform.isAarch64 "--enable-aarch64";
31
32 meta = {
33 description = "Error/erasure code system guarding data integrity";
34 homepage = "https://github.com/kspalaiologos/xpar";
35 changelog = "https://github.com/kspalaiologos/xpar/blob/${finalAttrs.version}/NEWS";
36 license = lib.licenses.gpl3Plus;
37 maintainers = with lib.maintainers; [ mrbenjadmin ];
38 platforms = lib.platforms.all;
39 mainProgram = "xpar";
40 };
41})