Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
49 lines
1.1 KiB
Nix
49 lines
1.1 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
cctools,
|
|
cmake,
|
|
fetchFromGitHub,
|
|
pkg-config,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "unicorn";
|
|
version = "2.1.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "unicorn-engine";
|
|
repo = "unicorn";
|
|
tag = version;
|
|
hash = "sha256-jEQXjYlLUdKrKPL4XfSbixn2KWJlNG7IYQveF4jDgl4=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
cctools
|
|
];
|
|
|
|
# Ensure the linker is using atomic when compiling for RISC-V, otherwise fails
|
|
NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isRiscV "-latomic";
|
|
|
|
cmakeFlags = lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
|
|
# Some x86 tests are interrupted by signal 10
|
|
"-DCMAKE_CTEST_ARGUMENTS=--exclude-regex;test_x86"
|
|
];
|
|
|
|
doCheck = true;
|
|
|
|
meta = with lib; {
|
|
description = "Lightweight multi-platform CPU emulator library";
|
|
homepage = "https://www.unicorn-engine.org";
|
|
license = licenses.gpl2Only;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [
|
|
thoughtpolice
|
|
];
|
|
};
|
|
}
|