mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-03 19:43:30 +00:00
e13831335f
* treewide: stdenv.is -> stdenv.hostPlatform.is * treewide: nixfmt due to ci error
40 lines
896 B
Nix
40 lines
896 B
Nix
{ lib
|
|
, stdenv
|
|
, cmake
|
|
, fetchFromGitHub
|
|
, fixDarwinDylibNames
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "capstone";
|
|
version = "5.0.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "capstone-engine";
|
|
repo = "capstone";
|
|
rev = version;
|
|
hash = "sha256-LZ10czBn5oaKMHQ8xguC6VZa7wvEgPRu6oWt/22QaDs=";
|
|
};
|
|
|
|
cmakeFlags = [
|
|
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ (lib.cmakeBool "CAPSTONE_BUILD_MACOS_THIN" true) ];
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
fixDarwinDylibNames
|
|
];
|
|
|
|
doCheck = true;
|
|
|
|
meta = {
|
|
description = "Advanced disassembly library";
|
|
homepage = "http://www.capstone-engine.org";
|
|
license = lib.licenses.bsd3;
|
|
maintainers = with lib.maintainers; [ thoughtpolice ris ];
|
|
mainProgram = "cstool";
|
|
platforms = lib.platforms.unix;
|
|
};
|
|
}
|