Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 cmake, 5 fetchFromGitHub, 6 fixDarwinDylibNames, 7}: 8 9stdenv.mkDerivation rec { 10 pname = "capstone"; 11 version = "4.0.2"; 12 13 src = fetchFromGitHub { 14 owner = "capstone-engine"; 15 repo = "capstone"; 16 rev = version; 17 sha256 = "sha256-XMwQ7UaPC8YYu4yxsE4bbR3leYPfBHu5iixSLz05r3g="; 18 }; 19 20 nativeBuildInputs = [ 21 cmake 22 ] 23 ++ lib.optionals stdenv.hostPlatform.isDarwin [ 24 fixDarwinDylibNames 25 ]; 26 27 doCheck = true; 28 29 meta = { 30 description = "Advanced disassembly library"; 31 homepage = "http://www.capstone-engine.org"; 32 license = lib.licenses.bsd3; 33 maintainers = with lib.maintainers; [ 34 thoughtpolice 35 ris 36 ]; 37 mainProgram = "cstool"; 38 platforms = lib.platforms.unix; 39 }; 40}