diff options
author | davidak <davidak@users.noreply.github.com> | 2022-05-23 14:37:53 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-23 14:37:53 +0200 |
commit | 6d82088583295dea8f9d7f61641dc3d8c5014fc7 (patch) | |
tree | c5fbc171c99794709901eb28a645f70c06db53d0 | |
parent | 9d7aff488a8f9429d9e6cd82c10dffbf21907fb1 (diff) | |
parent | ba114c44650d42f10cec28080c1de96866342b65 (diff) |
Merge pull request #173987 from gador/init-box64
box64: init at 0.1.8
-rw-r--r-- | pkgs/applications/emulators/box64/default.nix | 66 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 68 insertions, 0 deletions
diff --git a/pkgs/applications/emulators/box64/default.nix b/pkgs/applications/emulators/box64/default.nix new file mode 100644 index 0000000000000..e383333c42086 --- /dev/null +++ b/pkgs/applications/emulators/box64/default.nix @@ -0,0 +1,66 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, python3 +}: + +stdenv.mkDerivation rec { + pname = "box64"; + version = "0.1.8"; + + src = fetchFromGitHub { + owner = "ptitSeb"; + repo = pname; + rev = "v${version}"; + hash = "sha256-6k8Enbafnj19ATtgmw8W7LxtRpM3Ousj1bpZbbtq8TM="; + }; + + nativeBuildInputs = [ + cmake + python3 + ]; + + cmakeFlags = [ + "-DNOGIT=1" + ] ++ ( + if stdenv.hostPlatform.system == "aarch64-linux" then + [ + "-DARM_DYNAREC=ON" + ] + else [ + "-DLD80BITS=1" + "-DNOALIGN=1" + ] + ); + + installPhase = '' + runHook preInstall + install -Dm 0755 box64 "$out/bin/box64" + runHook postInstall + ''; + + doCheck = true; + + checkPhase = '' + runHook preCheck + ctest + runHook postCheck + ''; + + doInstallCheck = true; + + installCheckPhase = '' + runHook preInstallCheck + $out/bin/box64 -v + runHook postInstallCheck + ''; + + meta = with lib; { + homepage = "https://box86.org/"; + description = "Lets you run x86_64 Linux programs on non-x86_64 Linux systems"; + license = licenses.mit; + maintainers = with maintainers; [ gador ]; + platforms = [ "x86_64-linux" "aarch64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c4f7ea22b28ff..97a767e06fab2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1255,6 +1255,8 @@ with pkgs; wxGTK = wxGTK30; }; + box64 = callPackage ../applications/emulators/box64 { }; + caprice32 = callPackage ../applications/emulators/caprice32 { }; ccemux = callPackage ../applications/emulators/ccemux { }; |