-
-
Notifications
You must be signed in to change notification settings - Fork 12.8k
/
default.nix
51 lines (44 loc) · 1020 Bytes
/
default.nix
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{ lib
, buildPythonPackage
, fetchPypi
, fetchFromGitHub
, brotli
, lz4
}:
let
kaitai_compress = fetchFromGitHub {
owner = "kaitai-io";
repo = "kaitai_compress";
rev = "12f4cffb45d95b17033ee4f6679987656c6719cc";
hash = "sha256-l3rGbblUgxO6Y7grlsMEiT3nRIgUZV1VqTyjIgIDtyA=";
};
in
buildPythonPackage rec {
pname = "kaitaistruct";
version = "0.10";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-oETe4pFz1q+6zye8rDna+JtlTdQYz6AJq4LZF4qa5So=";
};
preBuild = ''
ln -s ${kaitai_compress}/python/kaitai kaitai
sed '32ipackages = kaitai/compress' -i setup.cfg
'';
propagatedBuildInputs = [
brotli
lz4
];
# no tests
dontCheck = true;
pythonImportsCheck = [
"kaitaistruct"
"kaitai.compress"
];
meta = with lib; {
description = "Kaitai Struct: runtime library for Python";
homepage = "https://github.com/kaitai-io/kaitai_struct_python_runtime";
license = licenses.mit;
maintainers = [ ];
};
}