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
52
pkgs/development/python-modules/unicorn/default.nix
Normal file
52
pkgs/development/python-modules/unicorn/default.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, setuptools
|
||||
, unicorn-emu
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "unicorn";
|
||||
version = lib.getVersion unicorn-emu;
|
||||
format = "setuptools";
|
||||
|
||||
src = unicorn-emu.src;
|
||||
|
||||
sourceRoot = "source/bindings/python";
|
||||
|
||||
prePatch = ''
|
||||
ln -s ${unicorn-emu}/lib/libunicorn${stdenv.targetPlatform.extensions.sharedLibrary} prebuilt/
|
||||
ln -s ${unicorn-emu}/lib/libunicorn.a prebuilt/
|
||||
'';
|
||||
|
||||
# needed on non-x86 linux
|
||||
setupPyBuildFlags = lib.optionals stdenv.isLinux [ "--plat-name" "linux" ]
|
||||
# aarch64 only available from MacOS SDK 11 onwards, so fix the version tag.
|
||||
# otherwise, bdist_wheel may detect "macosx_10_6_arm64" which doesn't make sense.
|
||||
++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [ "--plat-name" "macosx_11_0" ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
setuptools
|
||||
];
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
|
||||
mv unicorn unicorn.hidden
|
||||
patchShebangs sample_*.py shellcode.py
|
||||
sh -e sample_all.sh
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
"unicorn"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python bindings for Unicorn CPU emulator engine";
|
||||
homepage = "https://www.unicorn-engine.org/";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ bennofs ris ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue