Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 19.09 42 lines 936 B view raw
1{ stdenv 2, buildPythonPackage 3, fetchPypi 4, fetchpatch 5}: 6 7buildPythonPackage rec { 8 pname = "capstone"; 9 version = "3.0.5.post1"; 10 11 setupPyBuildFlags = [ 12 "--plat-name x86_64-linux" 13 ]; 14 15 src = fetchPypi { 16 inherit pname version; 17 sha256 = "3c0f73db9f8392f7048c8a244809f154d7c39f354e2167f6c477630aa517ed04"; 18 }; 19 20 patches = [ 21 (fetchpatch { 22 stripLen = 2; 23 url = "https://patch-diff.githubusercontent.com/raw/aquynh/capstone/pull/783/commits/23fe9f36622573c747e2bab6119ff245437bf276.patch"; 24 sha256 = "0yizqrdlxqxn16873593kdx2vrr7gvvilhgcf9xy6hr0603d3m5r"; 25 }) 26 ]; 27 28 postPatch = '' 29 patchShebangs src/make.sh 30 ''; 31 32 preCheck = '' 33 mv src/libcapstone.so capstone 34 ''; 35 36 meta = with stdenv.lib; { 37 homepage = "http://www.capstone-engine.org/"; 38 license = licenses.bsdOriginal; 39 description = "Capstone disassembly engine"; 40 maintainers = with maintainers; [ bennofs ]; 41 }; 42}