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
{ lib
2
, stdenv
0
3
, fetchFromGitHub
4
-
, pkg-config
5
, fixDarwinDylibNames
6
}:
7
···
16
sha256 = "sha256-XMwQ7UaPC8YYu4yxsE4bbR3leYPfBHu5iixSLz05r3g=";
17
};
18
19
-
# replace faulty macos detection
20
-
postPatch = lib.optionalString stdenv.isDarwin ''
21
-
sed -i 's/^IS_APPLE := .*$/IS_APPLE := 1/' Makefile
22
-
'';
23
-
24
-
configurePhase = "patchShebangs make.sh ";
25
-
buildPhase = "PREFIX=$out ./make.sh";
26
-
27
-
doCheck = true;
28
-
checkPhase = ''
29
-
# first remove fuzzing steps from check target
30
-
substituteInPlace Makefile --replace "fuzztest fuzzallcorp" ""
31
-
make check
32
-
'';
33
-
34
-
installPhase = (lib.optionalString stdenv.isDarwin "HOMEBREW_CAPSTONE=1 ")
35
-
+ "PREFIX=$out ./make.sh install";
36
-
37
nativeBuildInputs = [
38
-
pkg-config
39
] ++ lib.optionals stdenv.isDarwin [
40
fixDarwinDylibNames
41
];
42
43
-
enableParallelBuilding = true;
44
45
meta = {
46
description = "Advanced disassembly library";
···
1
{ lib
2
, stdenv
3
+
, cmake
4
, fetchFromGitHub
0
5
, fixDarwinDylibNames
6
}:
7
···
16
sha256 = "sha256-XMwQ7UaPC8YYu4yxsE4bbR3leYPfBHu5iixSLz05r3g=";
17
};
18
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
19
nativeBuildInputs = [
20
+
cmake
21
] ++ lib.optionals stdenv.isDarwin [
22
fixDarwinDylibNames
23
];
24
25
+
doCheck = true;
26
27
meta = {
28
description = "Advanced disassembly library";