diff options
author | Emily <git@emilylange.de> | 2023-08-12 13:57:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-12 13:57:59 +0200 |
commit | 9f039b93af2d6865640c173aed9aaeb763dc5a47 (patch) | |
tree | f4aceffc9c4f08ae56f12909d0ab0b664206a8c4 | |
parent | 2393e099a66eb0252ebcb38375b3aec52e36a78c (diff) | |
parent | d0eee4a5a72fc2a1c2a4fa3589e06a5a554da6b2 (diff) | |
download | nixpkgs-9f039b93af2d6865640c173aed9aaeb763dc5a47.tar nixpkgs-9f039b93af2d6865640c173aed9aaeb763dc5a47.tar.gz nixpkgs-9f039b93af2d6865640c173aed9aaeb763dc5a47.tar.bz2 nixpkgs-9f039b93af2d6865640c173aed9aaeb763dc5a47.tar.lz nixpkgs-9f039b93af2d6865640c173aed9aaeb763dc5a47.tar.xz nixpkgs-9f039b93af2d6865640c173aed9aaeb763dc5a47.tar.zst nixpkgs-9f039b93af2d6865640c173aed9aaeb763dc5a47.zip |
Merge pull request #248513 from OPNA2608/init/nuked-md
nuked-md: init at 1.2
-rw-r--r-- | pkgs/applications/emulators/nuked-md/default.nix | 72 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
2 files changed, 74 insertions, 0 deletions
diff --git a/pkgs/applications/emulators/nuked-md/default.nix b/pkgs/applications/emulators/nuked-md/default.nix new file mode 100644 index 00000000000..883d62b8983 --- /dev/null +++ b/pkgs/applications/emulators/nuked-md/default.nix @@ -0,0 +1,72 @@ +{ stdenv +, lib +, fetchFromGitHub +, gitUpdater +, cmake +, SDL2 +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "nuked-md"; + version = "1.2"; + + src = fetchFromGitHub { + owner = "nukeykt"; + repo = "Nuked-MD"; + rev = "v${finalAttrs.version}"; + hash = "sha256-Pe+TSu9FBUhxtACq+6jMbrUxiwKLOJgQbEcmUrcrjMs="; + }; + + # Interesting detail about our SDL2 packaging: + # Because we build it with the configure script instead of CMake, we ship sdl2-config.cmake instead of SDL2Config.cmake + # The former doesn't set SDL2_FOUND while the latter does (like CMake config scripts should), which causes this issue: + # + # CMake Error at CMakeLists.txt:5 (find_package): + # Found package configuration file: + # + # <SDL2.dev>/lib/cmake/SDL2/sdl2-config.cmake + # + # but it set SDL2_FOUND to FALSE so package "SDL2" is considered to be NOT + # FOUND. + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace 'SDL2 REQUIRED' 'SDL2' + ''; + + strictDeps = true; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + SDL2 + ]; + + installPhase = '' + runHook preInstall + + install -Dm755 Nuked-MD $out/bin/Nuked-MD + + runHook postInstall + ''; + + passthru = { + updateScript = gitUpdater { + rev-prefix = "v"; + }; + }; + + meta = with lib; { + description = "Cycle accurate Mega Drive emulator"; + longDescription = '' + Cycle accurate Mega Drive core. The goal of this project is to emulate Sega Mega Drive chipset as accurately as + possible using decapped chips photos. + ''; + homepage = "https://github.com/nukeykt/Nuked-MD"; + license = licenses.gpl2Plus; + mainProgram = "Nuked-MD"; + maintainers = with maintainers; [ OPNA2608 ]; + platforms = platforms.all; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7907722d9db..22967181b3c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2613,6 +2613,8 @@ with pkgs; np2kai = callPackage ../applications/emulators/np2kai { }; + nuked-md = callPackage ../applications/emulators/nuked-md { }; + oberon-risc-emu = callPackage ../applications/emulators/oberon-risc-emu { }; openmsx = callPackage ../applications/emulators/openmsx { }; |