uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
75
pkgs/applications/emulators/bsnes/ares/default.nix
Normal file
75
pkgs/applications/emulators/bsnes/ares/default.nix
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, wrapGAppsHook
|
||||
, SDL2
|
||||
, alsa-lib
|
||||
, gtk3
|
||||
, gtksourceview3
|
||||
, libGL
|
||||
, libGLU
|
||||
, libX11
|
||||
, libXv
|
||||
, libao
|
||||
, libpulseaudio
|
||||
, openal
|
||||
, udev
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ares";
|
||||
version = "128";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ares-emulator";
|
||||
repo = "ares";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-Ojf1kyColBK0S3DwXjGaAZSl0ljhgiXkfKC11BL2fEc=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./dont-rebuild-on-install.patch
|
||||
./fix-ruby.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
SDL2
|
||||
alsa-lib
|
||||
gtk3
|
||||
gtksourceview3
|
||||
libGL
|
||||
libGLU
|
||||
libX11
|
||||
libXv
|
||||
libao
|
||||
libpulseaudio
|
||||
openal
|
||||
udev
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
makeFlags = [
|
||||
"-C desktop-ui"
|
||||
"local=false"
|
||||
"openmp=true"
|
||||
"hiro=gtk3"
|
||||
"prefix=$(out)"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://ares.dev";
|
||||
description = "Open-source multi-system emulator with a focus on accuracy and preservation";
|
||||
license = licenses.isc;
|
||||
maintainers = with maintainers; [ Madouura ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
# TODO: select between Qt, GTK2 and GTK3
|
||||
# TODO: support Darwin
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
From 65cc7647110edd768e7baa7991143014316e655a Mon Sep 17 00:00:00 2001
|
||||
From: Madoura <93990818+Madouura@users.noreply.github.com>
|
||||
Date: Mon, 9 May 2022 10:17:06 -0500
|
||||
Subject: [PATCH] Update GNUmakefile
|
||||
|
||||
---
|
||||
desktop-ui/GNUmakefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/desktop-ui/GNUmakefile b/desktop-ui/GNUmakefile
|
||||
index 8e27b11d3..0bee561fb 100644
|
||||
--- a/desktop-ui/GNUmakefile
|
||||
+++ b/desktop-ui/GNUmakefile
|
||||
@@ -106,7 +106,7 @@ endif
|
||||
$(call rdelete,$(object.path))
|
||||
$(call rdelete,$(output.path))
|
||||
|
||||
-install: all
|
||||
+install:
|
||||
ifeq ($(platform),windows)
|
||||
$(call mkdir,$(prefix)/$(name)/)
|
||||
else ifeq ($(shell id -un),root)
|
||||
27
pkgs/applications/emulators/bsnes/ares/fix-ruby.patch
Normal file
27
pkgs/applications/emulators/bsnes/ares/fix-ruby.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
diff --git a/ruby/GNUmakefile b/ruby/GNUmakefile
|
||||
index e85a51701..7fca89e0f 100644
|
||||
--- a/ruby/GNUmakefile
|
||||
+++ b/ruby/GNUmakefile
|
||||
@@ -8,19 +8,9 @@ ifeq ($(ruby),)
|
||||
ruby += audio.openal
|
||||
ruby += input.quartz #input.carbon
|
||||
else ifeq ($(platform),linux)
|
||||
- pkg_check1 = $(if $(shell test -e /usr/lib/lib$1.so && echo 1),$2)
|
||||
- pkg_check2 = $(if $(shell test -e /usr/lib/$(shell uname -m)-linux-gnu/lib$1.so && echo 1),$2)
|
||||
- pkg_check = $(call pkg_check1,$1,$2) $(call pkg_check2,$1,$2)
|
||||
- ruby += video.glx video.glx2 video.xshm
|
||||
- ruby += $(call pkg_check,Xv,video.xvideo)
|
||||
- ruby += audio.oss audio.alsa
|
||||
- ruby += $(call pkg_check,openal,audio.openal)
|
||||
- ruby += $(call pkg_check,pulse,audio.pulseaudio)
|
||||
- ruby += $(call pkg_check,pulse-simple,audio.pulseaudiosimple)
|
||||
- ruby += $(call pkg_check,ao,audio.ao)
|
||||
- ruby += input.xlib
|
||||
- ruby += $(call pkg_check,udev,input.udev)
|
||||
- ruby += $(call pkg_check,SDL2,input.sdl)
|
||||
+ ruby += video.glx video.glx2 video.xshm video.xvideo
|
||||
+ ruby += audio.oss audio.alsa audio.openal audio.pulseaudio audio.pulseaudiosimple audio.ao
|
||||
+ ruby += input.xlib input.udev input.sdl
|
||||
else ifeq ($(platform),bsd)
|
||||
pkg_check = $(if $(shell test -e /usr/local/lib/lib$1.so && echo 1),$2)
|
||||
ruby += video.glx video.glx2 video.xshm
|
||||
67
pkgs/applications/emulators/bsnes/bsnes-hd/default.nix
Normal file
67
pkgs/applications/emulators/bsnes/bsnes-hd/default.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{ lib, stdenv, fetchFromGitHub
|
||||
, pkg-config
|
||||
, wrapGAppsHook
|
||||
, libX11, libXv
|
||||
, udev
|
||||
, SDL2
|
||||
, gtk3, gtksourceview3
|
||||
, alsa-lib, libao, openal, libpulseaudio
|
||||
, libicns, Cocoa, OpenAL
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "bsnes-hd";
|
||||
version = "10.6-beta";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "DerKoun";
|
||||
repo = "bsnes-hd";
|
||||
rev = "beta_10_6";
|
||||
sha256 = "0f3cd89fd0lqskzj98cc1pzmdbscq0psdjckp86w94rbchx7iw4h";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Replace invocation of `sips` with an equivalent invocation of `png2icns`
|
||||
# while assembling the .app directory hierarchy in the macos build. The
|
||||
# `sips` executable isn't in our environment during the build, but
|
||||
# `png2icns` is available by way of the dependency on libicns.
|
||||
./macos-replace-sips-with-png2icns.patch
|
||||
|
||||
# During `make install` on macos the Makefile wants to move the .app into
|
||||
# the current user's home directory. This patches the Makefile such that
|
||||
# the .app ends up in $(prefix)/Applications. The $(prefix) variable will
|
||||
# be set to $out, so this will result in the .app ending up in the
|
||||
# Applications directory in the current nix profile.
|
||||
./macos-copy-app-to-prefix.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config wrapGAppsHook ]
|
||||
++ lib.optionals stdenv.isDarwin [ libicns ];
|
||||
|
||||
buildInputs = [ SDL2 libao ]
|
||||
++ lib.optionals stdenv.isLinux [ libX11 libXv udev gtk3 gtksourceview3 alsa-lib openal libpulseaudio ]
|
||||
++ lib.optionals stdenv.isDarwin [ Cocoa OpenAL ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
makeFlags = [ "-C" "bsnes" "hiro=gtk3" "prefix=$(out)" ];
|
||||
|
||||
# https://github.com/bsnes-emu/bsnes/issues/107
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(
|
||||
--prefix GDK_BACKEND : x11
|
||||
)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A fork of bsnes that adds HD video features";
|
||||
homepage = "https://github.com/DerKoun/bsnes-hd";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ stevebob ];
|
||||
platforms = platforms.unix;
|
||||
# ../nall/traits.hpp:19:14: error: no member named 'is_floating_point_v' in namespace 'std'; did you mean 'is_floating_point'?
|
||||
# using std::is_floating_point_v;
|
||||
broken = (stdenv.isDarwin && stdenv.isx86_64);
|
||||
mainProgram = "bsnes";
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
diff --git a/bsnes/target-bsnes/GNUmakefile b/bsnes/target-bsnes/GNUmakefile
|
||||
index 7a3ab9f..ec8a1a4 100644
|
||||
--- a/bsnes/target-bsnes/GNUmakefile
|
||||
+++ b/bsnes/target-bsnes/GNUmakefile
|
||||
@@ -43,11 +43,8 @@ ifeq ($(platform),windows)
|
||||
else ifeq ($(shell id -un),root)
|
||||
$(error "make install should not be run as root")
|
||||
else ifeq ($(platform),macos)
|
||||
- mkdir -p ~/Library/Application\ Support/$(name)/
|
||||
- mkdir -p ~/Library/Application\ Support/$(name)/Database/
|
||||
- mkdir -p ~/Library/Application\ Support/$(name)/Firmware/
|
||||
- mkdir -p ~/Library/Application\ Support/$(name)/Shaders/
|
||||
- cp -R out/$(name).app /Applications/$(name).app
|
||||
+ mkdir -p $(prefix)/Applications
|
||||
+ cp -R out/$(name).app $(prefix)/Applications
|
||||
else ifneq ($(filter $(platform),linux bsd),)
|
||||
mkdir -p $(prefix)/bin/
|
||||
mkdir -p $(prefix)/share/applications/
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/bsnes/target-bsnes/GNUmakefile b/bsnes/target-bsnes/GNUmakefile
|
||||
index 4c67bde..7a3ab9f 100644
|
||||
--- a/bsnes/target-bsnes/GNUmakefile
|
||||
+++ b/bsnes/target-bsnes/GNUmakefile
|
||||
@@ -33,7 +33,7 @@ ifeq ($(platform),macos)
|
||||
cp Database/* out/$(name).app/Contents/MacOS/Database/
|
||||
cp -r ../shaders/* out/$(name).app/Contents/macOS/Shaders/
|
||||
cp $(ui)/resource/$(name).plist out/$(name).app/Contents/Info.plist
|
||||
- sips -s format icns $(ui)/resource/$(name).png --out out/$(name).app/Contents/Resources/$(name).icns
|
||||
+ png2icns out/$(name).app/Contents/Resources/$(name).icns $(ui)/resource/$(name).png
|
||||
endif
|
||||
|
||||
verbose: hiro.verbose ruby.verbose nall.verbose all;
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
diff -Naur source-old/higan/fc/ppu/ppu.cpp source-new/higan/fc/ppu/ppu.cpp
|
||||
--- source-old/higan/fc/ppu/ppu.cpp 1969-12-31 21:00:01.000000000 -0300
|
||||
+++ source-new/higan/fc/ppu/ppu.cpp 2021-09-29 22:23:19.107527772 -0300
|
||||
@@ -1,3 +1,4 @@
|
||||
+#include <cmath>
|
||||
#include <fc/fc.hpp>
|
||||
|
||||
namespace higan::Famicom {
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
diff -Naur source-old/higan-ui/GNUmakefile source-new/higan-ui/GNUmakefile
|
||||
--- source-old/higan-ui/GNUmakefile 1969-12-31 21:00:01.000000000 -0300
|
||||
+++ source-new/higan-ui/GNUmakefile 2021-09-29 22:35:35.744721052 -0300
|
||||
@@ -61,7 +61,7 @@
|
||||
mkdir -p $(output.path)/$(name).app/Contents/Resources/
|
||||
mv $(output.path)/$(name) $(output.path)/$(name).app/Contents/MacOS/$(name)
|
||||
cp resource/$(name).plist $(output.path)/$(name).app/Contents/Info.plist
|
||||
- sips -s format icns resource/$(name).png --out $(output.path)/$(name).app/Contents/Resources/$(name).icns
|
||||
+ png2icns $(output.path)/$(name).app/Contents/Resources/$(name).icns resource/$(name).png
|
||||
endif
|
||||
|
||||
verbose: nall.verbose ruby.verbose hiro.verbose all;
|
||||
diff -Naur source-old/icarus/GNUmakefile source-new/icarus/GNUmakefile
|
||||
--- source-old/icarus/GNUmakefile 1969-12-31 21:00:01.000000000 -0300
|
||||
+++ source-new/icarus/GNUmakefile 2021-09-29 22:35:53.639846113 -0300
|
||||
@@ -26,7 +26,7 @@
|
||||
mkdir -p $(output.path)/$(name).app/Contents/Resources/
|
||||
mv $(output.path)/$(name) $(output.path)/$(name).app/Contents/MacOS/$(name)
|
||||
cp resource/$(name).plist $(output.path)/$(name).app/Contents/Info.plist
|
||||
- sips -s format icns resource/$(name).png --out $(output.path)/$(name).app/Contents/Resources/$(name).icns
|
||||
+ png2icns $(output.path)/$(name).app/Contents/Resources/$(name).icns resource/$(name).png
|
||||
endif
|
||||
|
||||
verbose: hiro.verbose nall.verbose all;
|
||||
155
pkgs/applications/emulators/bsnes/higan/default.nix
Normal file
155
pkgs/applications/emulators/bsnes/higan/default.nix
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, SDL2
|
||||
, alsa-lib
|
||||
, gtk3
|
||||
, gtksourceview3
|
||||
, libGL
|
||||
, libGLU
|
||||
, libX11
|
||||
, libXv
|
||||
, libao
|
||||
, libpulseaudio
|
||||
, openal
|
||||
, pkg-config
|
||||
, runtimeShell
|
||||
, udev
|
||||
# Darwin dependencies
|
||||
, libicns
|
||||
, darwin
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "higan";
|
||||
version = "115+unstable=2021-08-18";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "higan-emu";
|
||||
repo = "higan";
|
||||
rev = "9bf1b3314b2bcc73cbc11d344b369c31562aff10";
|
||||
hash = "sha256-HZItJ97x20OjFKv2OVbMja7g+c1ZXcgcaC/XDe3vMZM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
libicns
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
SDL2
|
||||
libao
|
||||
] ++ lib.optionals stdenv.isLinux [
|
||||
alsa-lib
|
||||
gtk3
|
||||
gtksourceview3
|
||||
libGL
|
||||
libGLU
|
||||
libX11
|
||||
libXv
|
||||
libpulseaudio
|
||||
openal
|
||||
udev
|
||||
]
|
||||
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||
Carbon
|
||||
Cocoa
|
||||
OpenAL
|
||||
OpenGL
|
||||
]);
|
||||
|
||||
patches = [
|
||||
# Includes cmath header
|
||||
./001-include-cmath.patch
|
||||
# Uses png2icns instead of sips
|
||||
./002-sips-to-png2icns.patch
|
||||
];
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
make -j $NIX_BUILD_CORES compiler=${stdenv.cc.targetPrefix}c++ \
|
||||
platform=linux openmp=true hiro=gtk3 build=accuracy local=false \
|
||||
cores="cv fc gb gba md ms msx ngp pce sfc sg ws" -C higan-ui
|
||||
make -j $NIX_BUILD_CORES compiler=${stdenv.cc.targetPrefix}c++ \
|
||||
platform=linux openmp=true hiro=gtk3 -C icarus
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
'' + (if stdenv.isDarwin then ''
|
||||
mkdir ${placeholder "out"}
|
||||
mv higan/out/higan.app ${placeholder "out"}/
|
||||
mv icarus/out/icarus.app ${placeholder "out"}/
|
||||
'' else ''
|
||||
install -d ${placeholder "out"}/bin
|
||||
install higan-ui/out/higan -t ${placeholder "out"}/bin/
|
||||
install icarus/out/icarus -t ${placeholder "out"}/bin/
|
||||
|
||||
install -d ${placeholder "out"}/share/applications
|
||||
install higan-ui/resource/higan.desktop -t ${placeholder "out"}/share/applications/
|
||||
install icarus/resource/icarus.desktop -t ${placeholder "out"}/share/applications/
|
||||
|
||||
install -d ${placeholder "out"}/share/pixmaps
|
||||
install higan/higan/resource/higan.svg ${placeholder "out"}/share/pixmaps/higan-icon.svg
|
||||
install higan/higan/resource/logo.png ${placeholder "out"}/share/pixmaps/higan-icon.png
|
||||
install icarus/resource/icarus.svg ${placeholder "out"}/share/pixmaps/icarus-icon.svg
|
||||
install icarus/resource/icarus.png ${placeholder "out"}/share/pixmaps/icarus-icon.png
|
||||
'') + ''
|
||||
install -d ${placeholder "out"}/share/higan
|
||||
cp -rd extras/ higan/System/ ${placeholder "out"}/share/higan/
|
||||
|
||||
install -d ${placeholder "out"}/share/icarus
|
||||
cp -rd icarus/Database icarus/Firmware ${placeholder "out"}/share/icarus/
|
||||
'' + (
|
||||
# A dirty workaround, suggested by @cpages:
|
||||
# we create a first-run script to populate
|
||||
# $HOME with all the stuff needed at runtime
|
||||
let
|
||||
dest = if stdenv.isDarwin
|
||||
then "\\$HOME/Library/Application Support/higan"
|
||||
else "\\$HOME/higan";
|
||||
in ''
|
||||
mkdir -p ${placeholder "out"}/bin
|
||||
cat <<EOF > ${placeholder "out"}/bin/higan-init.sh
|
||||
#!${runtimeShell}
|
||||
|
||||
cp --recursive --update ${placeholder "out"}/share/higan/System/ "${dest}"/
|
||||
|
||||
EOF
|
||||
|
||||
chmod +x ${placeholder "out"}/bin/higan-init.sh
|
||||
'') + ''
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/higan-emu/higan";
|
||||
description = "An open-source, cycle-accurate multi-system emulator";
|
||||
longDescription = ''
|
||||
higan is a multi-system emulator, originally developed by Near, with an
|
||||
uncompromising focus on accuracy and code readability.
|
||||
|
||||
It currently emulates the following systems: Famicom, Famicom Disk System,
|
||||
Super Famicom, Super Game Boy, Game Boy, Game Boy Color, Game Boy Advance,
|
||||
Game Boy Player, SG-1000, SC-3000, Master System, Game Gear, Mega Drive,
|
||||
Mega CD, PC Engine, SuperGrafx, MSX, MSX2, ColecoVision, Neo Geo Pocket,
|
||||
Neo Geo Pocket Color, WonderSwan, WonderSwan Color, SwanCrystal, Pocket
|
||||
Challenge V2.
|
||||
'';
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ AndersonTorres ];
|
||||
platforms = platforms.unix;
|
||||
broken = stdenv.isDarwin;
|
||||
};
|
||||
}
|
||||
# TODO: select between Qt, GTK2 and GTK3
|
||||
Loading…
Add table
Add a link
Reference in a new issue