uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
46
pkgs/development/libraries/capstone/default.nix
Normal file
46
pkgs/development/libraries/capstone/default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{ lib, stdenv, fetchFromGitHub, pkg-config }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "capstone";
|
||||
version = "4.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aquynh";
|
||||
repo = "capstone";
|
||||
rev = version;
|
||||
sha256 = "sha256-XMwQ7UaPC8YYu4yxsE4bbR3leYPfBHu5iixSLz05r3g=";
|
||||
};
|
||||
|
||||
# replace faulty macos detection
|
||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||
sed -i 's/^IS_APPLE := .*$/IS_APPLE := 1/' Makefile
|
||||
'';
|
||||
|
||||
configurePhase = "patchShebangs make.sh ";
|
||||
buildPhase = "PREFIX=$out ./make.sh";
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
# first remove fuzzing steps from check target
|
||||
substituteInPlace Makefile --replace "fuzztest fuzzallcorp" ""
|
||||
make check
|
||||
'';
|
||||
|
||||
installPhase = (lib.optionalString stdenv.isDarwin "HOMEBREW_CAPSTONE=1 ")
|
||||
+ "PREFIX=$out ./make.sh install";
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
enableParallelBuilding = 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;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue