Merge pull request #130166 from stevebob/init-bsnes-hd

authored by

Sandro and committed by
GitHub
d0714a74 7bad0b5e

+97
+6
maintainers/maintainer-list.nix
··· 10134 10134 githubId = 1829294; 10135 10135 name = "Steve Chávez"; 10136 10136 }; 10137 + stevebob = { 10138 + email = "stephen@sherra.tt"; 10139 + github = "stevebob"; 10140 + githubId = 417118; 10141 + name = "Stephen Sherratt"; 10142 + }; 10137 10143 steveej = { 10138 10144 email = "mail@stefanjunker.de"; 10139 10145 github = "steveej";
+55
pkgs/misc/emulators/bsnes-hd/default.nix
··· 1 + { lib, stdenv, fetchFromGitHub 2 + , pkg-config 3 + , libX11, libXv 4 + , udev 5 + , SDL2 6 + , gtk2, gtksourceview 7 + , alsa-lib, libao, openal, libpulseaudio 8 + , libicns, Cocoa, OpenAL 9 + }: 10 + 11 + stdenv.mkDerivation { 12 + pname = "bsnes-hd"; 13 + version = "10.6-beta"; 14 + 15 + src = fetchFromGitHub { 16 + owner = "DerKoun"; 17 + repo = "bsnes-hd"; 18 + rev = "beta_10_6"; 19 + sha256 = "0f3cd89fd0lqskzj98cc1pzmdbscq0psdjckp86w94rbchx7iw4h"; 20 + }; 21 + 22 + patches = [ 23 + # Replace invocation of `sips` with an equivalent invocation of `png2icns` 24 + # while assembling the .app directory hierarchy in the macos build. The 25 + # `sips` executable isn't in our environment during the build, but 26 + # `png2icns` is available by way of the dependency on libicns. 27 + ./macos-replace-sips-with-png2icns.patch 28 + 29 + # During `make install` on macos the Makefile wants to move the .app into 30 + # the current user's home directory. This patches the Makefile such that 31 + # the .app ends up in $(prefix)/Applications. The $(prefix) variable will 32 + # be set to $out, so this will result in the .app ending up in the 33 + # Applications directory in the current nix profile. 34 + ./macos-copy-app-to-prefix.patch 35 + ]; 36 + 37 + nativeBuildInputs = [ pkg-config ] 38 + ++ lib.optionals stdenv.isDarwin [ libicns ]; 39 + 40 + buildInputs = [ SDL2 libao ] 41 + ++ lib.optionals stdenv.isLinux [ libX11 libXv udev gtk2 gtksourceview alsa-lib openal libpulseaudio ] 42 + ++ lib.optionals stdenv.isDarwin [ Cocoa OpenAL ]; 43 + 44 + enableParallelBuilding = true; 45 + 46 + makeFlags = [ "-C" "bsnes" "prefix=$(out)" ]; 47 + 48 + meta = with lib; { 49 + description = "A fork of bsnes that adds HD video features"; 50 + homepage = "https://github.com/DerKoun/bsnes-hd"; 51 + license = licenses.gpl3Only; 52 + maintainers = with maintainers; [ stevebob ]; 53 + platforms = platforms.unix; 54 + }; 55 + }
+18
pkgs/misc/emulators/bsnes-hd/macos-copy-app-to-prefix.patch
··· 1 + diff --git a/bsnes/target-bsnes/GNUmakefile b/bsnes/target-bsnes/GNUmakefile 2 + index 7a3ab9f..ec8a1a4 100644 3 + --- a/bsnes/target-bsnes/GNUmakefile 4 + +++ b/bsnes/target-bsnes/GNUmakefile 5 + @@ -43,11 +43,8 @@ ifeq ($(platform),windows) 6 + else ifeq ($(shell id -un),root) 7 + $(error "make install should not be run as root") 8 + else ifeq ($(platform),macos) 9 + - mkdir -p ~/Library/Application\ Support/$(name)/ 10 + - mkdir -p ~/Library/Application\ Support/$(name)/Database/ 11 + - mkdir -p ~/Library/Application\ Support/$(name)/Firmware/ 12 + - mkdir -p ~/Library/Application\ Support/$(name)/Shaders/ 13 + - cp -R out/$(name).app /Applications/$(name).app 14 + + mkdir -p $(prefix)/Applications 15 + + cp -R out/$(name).app $(prefix)/Applications 16 + else ifneq ($(filter $(platform),linux bsd),) 17 + mkdir -p $(prefix)/bin/ 18 + mkdir -p $(prefix)/share/applications/
+13
pkgs/misc/emulators/bsnes-hd/macos-replace-sips-with-png2icns.patch
··· 1 + diff --git a/bsnes/target-bsnes/GNUmakefile b/bsnes/target-bsnes/GNUmakefile 2 + index 4c67bde..7a3ab9f 100644 3 + --- a/bsnes/target-bsnes/GNUmakefile 4 + +++ b/bsnes/target-bsnes/GNUmakefile 5 + @@ -33,7 +33,7 @@ ifeq ($(platform),macos) 6 + cp Database/* out/$(name).app/Contents/MacOS/Database/ 7 + cp -r ../shaders/* out/$(name).app/Contents/macOS/Shaders/ 8 + cp $(ui)/resource/$(name).plist out/$(name).app/Contents/Info.plist 9 + - sips -s format icns $(ui)/resource/$(name).png --out out/$(name).app/Contents/Resources/$(name).icns 10 + + png2icns out/$(name).app/Contents/Resources/$(name).icns $(ui)/resource/$(name).png 11 + endif 12 + 13 + verbose: hiro.verbose ruby.verbose nall.verbose all;
+5
pkgs/top-level/all-packages.nix
··· 32133 32133 inherit (darwin.apple_sdk.frameworks) Carbon Cocoa OpenGL OpenAL; 32134 32134 }; 32135 32135 32136 + bsnes-hd = callPackage ../misc/emulators/bsnes-hd { 32137 + inherit (gnome2) gtksourceview; 32138 + inherit (darwin.apple_sdk.frameworks) Cocoa OpenAL; 32139 + }; 32140 + 32136 32141 yapesdl = callPackage ../misc/emulators/yapesdl { }; 32137 32142 32138 32143 x16-emulator = callPackage ../misc/emulators/commanderx16/emulator.nix { };