tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
capstone: build with cmake
Nick Cao
2 years ago
19d28fc4
905c6263
+3
-21
1 changed file
expand all
collapse all
unified
split
pkgs
development
libraries
capstone
default.nix
+3
-21
pkgs/development/libraries/capstone/default.nix
···
1
1
{ lib
2
2
, stdenv
3
3
+
, cmake
3
4
, fetchFromGitHub
4
4
-
, pkg-config
5
5
, fixDarwinDylibNames
6
6
}:
7
7
···
16
16
sha256 = "sha256-XMwQ7UaPC8YYu4yxsE4bbR3leYPfBHu5iixSLz05r3g=";
17
17
};
18
18
19
19
-
# replace faulty macos detection
20
20
-
postPatch = lib.optionalString stdenv.isDarwin ''
21
21
-
sed -i 's/^IS_APPLE := .*$/IS_APPLE := 1/' Makefile
22
22
-
'';
23
23
-
24
24
-
configurePhase = "patchShebangs make.sh ";
25
25
-
buildPhase = "PREFIX=$out ./make.sh";
26
26
-
27
27
-
doCheck = true;
28
28
-
checkPhase = ''
29
29
-
# first remove fuzzing steps from check target
30
30
-
substituteInPlace Makefile --replace "fuzztest fuzzallcorp" ""
31
31
-
make check
32
32
-
'';
33
33
-
34
34
-
installPhase = (lib.optionalString stdenv.isDarwin "HOMEBREW_CAPSTONE=1 ")
35
35
-
+ "PREFIX=$out ./make.sh install";
36
36
-
37
19
nativeBuildInputs = [
38
38
-
pkg-config
20
20
+
cmake
39
21
] ++ lib.optionals stdenv.isDarwin [
40
22
fixDarwinDylibNames
41
23
];
42
24
43
43
-
enableParallelBuilding = true;
25
25
+
doCheck = true;
44
26
45
27
meta = {
46
28
description = "Advanced disassembly library";