at master 1.3 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 fetchpatch, 6 cython, 7 poetry-core, 8 setuptools, 9 pytestCheckHook, 10}: 11 12buildPythonPackage rec { 13 pname = "rencode"; 14 version = "1.0.8"; 15 pyproject = true; 16 17 src = fetchFromGitHub { 18 owner = "aresch"; 19 repo = "rencode"; 20 tag = "v${version}"; 21 hash = "sha256-k2b6DoKwNeQBkmqSRXqaRTjK7CVX6IKuXCLG9lBdLLY="; 22 }; 23 24 patches = [ 25 # backport fix for -msse being passed on aarch64-linux 26 (fetchpatch { 27 url = "https://github.com/aresch/rencode/commit/591b9f4d85d7e2d4f4e99441475ef15366389be2.patch"; 28 hash = "sha256-KhfawtYa4CnYiVzBYdtMn/JRkeqCLJetHvLEm1YVOe4="; 29 }) 30 # do not pass -march=native etc. on x86_64 31 (fetchpatch { 32 url = "https://github.com/aresch/rencode/commit/e7ec8ea718e73a8fee7dbc007c262e1584f7f94b.patch"; 33 hash = "sha256-gNYjxBsMN1p4IAmutV73JF8yCj0iz3DIl7kg7WrBdbs="; 34 }) 35 ]; 36 37 nativeBuildInputs = [ 38 poetry-core 39 setuptools 40 cython 41 ]; 42 43 nativeCheckInputs = [ pytestCheckHook ]; 44 45 preCheck = '' 46 # import from $out 47 rm -r rencode 48 ''; 49 50 meta = with lib; { 51 homepage = "https://github.com/aresch/rencode"; 52 description = "Fast (basic) object serialization similar to bencode"; 53 license = licenses.gpl3Plus; 54 maintainers = [ ]; 55 }; 56}