felix86: init at 26.04
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
|
||||
cmake,
|
||||
pkg-config,
|
||||
|
||||
libGL,
|
||||
libx11,
|
||||
vulkan-headers,
|
||||
vulkan-loader,
|
||||
|
||||
callPackage,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "felix86";
|
||||
version = "26.04";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "OFFTKP";
|
||||
repo = "felix86";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-onhPibvO74yo95zop7EhG+EILn4M70X9ivhS9I+fIBY=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
vulkan-headers
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libGL
|
||||
libx11
|
||||
vulkan-loader
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 felix86 $out/bin/felix86
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "ZYDIS_BUILD_DOXYGEN" false)
|
||||
(lib.cmakeBool "BUILD_TESTS" true)
|
||||
];
|
||||
|
||||
passthru.tests = callPackage ./test.nix { };
|
||||
|
||||
meta = {
|
||||
description = "x86 and x86-64 userspace emulator for RISC-V Linux";
|
||||
homepage = "https://github.com/OFFTKP/felix86";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ eljamm ];
|
||||
teams = with lib.teams; [ ngi ];
|
||||
mainProgram = "felix86";
|
||||
platforms = [ "riscv64-linux" ];
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
pkgs.testers.nixosTest {
|
||||
name = "felix86";
|
||||
|
||||
nodes.machine =
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
boot.binfmt.emulatedSystems = [ "riscv64-linux" ];
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.pkgsCross.riscv64.felix86
|
||||
];
|
||||
};
|
||||
|
||||
testScript =
|
||||
# python
|
||||
''
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
machine.succeed("felix86 --help")
|
||||
'';
|
||||
|
||||
interactive.nodes.machine = {
|
||||
virtualisation.graphics = false;
|
||||
environment.systemPackages = [ pkgs.binutils ];
|
||||
};
|
||||
interactive.sshBackdoor.enable = true;
|
||||
}
|
||||
Reference in New Issue
Block a user