mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 00:24:18 +00:00
{ares,bsnes-hd,higan}: update (#353102)
This commit is contained in:
commit
2f3930f291
@ -1,98 +0,0 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, SDL2
|
||||
, alsa-lib
|
||||
, gtk3
|
||||
, gtksourceview3
|
||||
, libGL
|
||||
, libGLU
|
||||
, libX11
|
||||
, libXv
|
||||
, libao
|
||||
, libicns
|
||||
, libpulseaudio
|
||||
, openal
|
||||
, pkg-config
|
||||
, udev
|
||||
, which
|
||||
, wrapGAppsHook3
|
||||
, darwin
|
||||
, vulkan-loader
|
||||
, autoPatchelfHook
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ares";
|
||||
version = "136";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ares-emulator";
|
||||
repo = "ares";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-Hks/MWusPiBVdb5L+53qtR6VmXG/P4rDzsvHxLeA8Do=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./001-dont-rebuild-on-install.patch
|
||||
./002-fix-ruby.diff
|
||||
./003-darwin-specific.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoPatchelfHook
|
||||
pkg-config
|
||||
which
|
||||
wrapGAppsHook3
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
libicns
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
SDL2
|
||||
libao
|
||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
alsa-lib
|
||||
gtk3
|
||||
gtksourceview3
|
||||
libGL
|
||||
libGLU
|
||||
libX11
|
||||
libXv
|
||||
libpulseaudio
|
||||
openal
|
||||
udev
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
darwin.apple_sdk_11_0.frameworks.Cocoa
|
||||
darwin.apple_sdk_11_0.frameworks.OpenAL
|
||||
];
|
||||
|
||||
appendRunpaths = [ (lib.makeLibraryPath [ vulkan-loader ]) ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
makeFlags = lib.optionals stdenv.hostPlatform.isLinux [
|
||||
"hiro=gtk3"
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
"hiro=cocoa"
|
||||
"lto=false"
|
||||
"vulkan=false"
|
||||
] ++ [
|
||||
"local=false"
|
||||
"openmp=true"
|
||||
"prefix=$(out)"
|
||||
];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-mmacosx-version-min=10.14";
|
||||
|
||||
meta = {
|
||||
homepage = "https://ares-emu.net";
|
||||
description = "Open-source multi-system emulator with a focus on accuracy and preservation";
|
||||
mainProgram = "ares";
|
||||
license = lib.licenses.isc;
|
||||
maintainers = with lib.maintainers; [ Madouura AndersonTorres ];
|
||||
platforms = lib.platforms.unix;
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
})
|
||||
# TODO: select between Qt and GTK3
|
@ -1,83 +0,0 @@
|
||||
{ lib, stdenv, fetchFromGitHub, fetchpatch
|
||||
, pkg-config
|
||||
, wrapGAppsHook3
|
||||
, libX11, libXv
|
||||
, udev
|
||||
, SDL2
|
||||
, gtk3, gtksourceview3
|
||||
, alsa-lib, libao, openal, libpulseaudio
|
||||
, libicns, makeWrapper, darwin
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (darwin.apple_sdk_11_0.frameworks) Cocoa OpenAL;
|
||||
in
|
||||
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
|
||||
|
||||
# Fix build against gcc-13:
|
||||
# https://github.com/DerKoun/bsnes-hd/pull/124
|
||||
(fetchpatch {
|
||||
name = "gcc-13.patch";
|
||||
url = "https://github.com/DerKoun/bsnes-hd/commit/587e496f667970d60b6ea29976c171da1681388e.patch";
|
||||
hash = "sha256-7KBXh8b4xGTzgV2Pt8B1eFZHOaXcCKXKzqGOf0rFG0c=";
|
||||
})
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ wrapGAppsHook3 ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ libicns makeWrapper ];
|
||||
|
||||
buildInputs = [ SDL2 libao ]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ libX11 libXv udev gtk3 gtksourceview3 alsa-lib openal libpulseaudio ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ Cocoa OpenAL ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
makeFlags = [ "-C" "bsnes" "prefix=$(out)" ]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ "hiro=gtk3" ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ "hiro=cocoa" ];
|
||||
|
||||
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
mkdir -p $out/bin
|
||||
makeWrapper $out/{Applications/bsnes.app/Contents/MacOS,bin}/bsnes
|
||||
'';
|
||||
|
||||
# https://github.com/bsnes-emu/bsnes/issues/107
|
||||
preFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
gappsWrapperArgs+=(
|
||||
--prefix GDK_BACKEND : x11
|
||||
)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "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;
|
||||
mainProgram = "bsnes";
|
||||
};
|
||||
}
|
110
pkgs/by-name/ar/ares/package.nix
Normal file
110
pkgs/by-name/ar/ares/package.nix
Normal file
@ -0,0 +1,110 @@
|
||||
{
|
||||
lib,
|
||||
SDL2,
|
||||
alsa-lib,
|
||||
apple-sdk_11,
|
||||
autoPatchelfHook,
|
||||
fetchFromGitHub,
|
||||
gtk3,
|
||||
gtksourceview3,
|
||||
libGL,
|
||||
libGLU,
|
||||
libX11,
|
||||
libXv,
|
||||
libao,
|
||||
libicns,
|
||||
libpulseaudio,
|
||||
openal,
|
||||
pkg-config,
|
||||
stdenv,
|
||||
udev,
|
||||
vulkan-loader,
|
||||
which,
|
||||
wrapGAppsHook3,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ares";
|
||||
version = "136";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ares-emulator";
|
||||
repo = "ares";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-Hks/MWusPiBVdb5L+53qtR6VmXG/P4rDzsvHxLeA8Do=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
./patches/001-dont-rebuild-on-install.patch
|
||||
./patches/002-fix-ruby.diff
|
||||
./patches/003-darwin-specific.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs =
|
||||
[
|
||||
autoPatchelfHook
|
||||
pkg-config
|
||||
which
|
||||
wrapGAppsHook3
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
libicns
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
SDL2
|
||||
libao
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
alsa-lib
|
||||
gtk3
|
||||
gtksourceview3
|
||||
libGL
|
||||
libGLU
|
||||
libX11
|
||||
libXv
|
||||
libpulseaudio
|
||||
openal
|
||||
udev
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
apple-sdk_11
|
||||
];
|
||||
|
||||
appendRunpaths = [ (lib.makeLibraryPath [ vulkan-loader ]) ];
|
||||
|
||||
makeFlags =
|
||||
lib.optionals stdenv.hostPlatform.isLinux [
|
||||
"hiro=gtk3"
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
"hiro=cocoa"
|
||||
"lto=false"
|
||||
"vulkan=false"
|
||||
]
|
||||
++ [
|
||||
"local=false"
|
||||
"openmp=true"
|
||||
"prefix=$(out)"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.hostPlatform.isDarwin "-mmacosx-version-min=10.14";
|
||||
|
||||
meta = {
|
||||
homepage = "https://ares-emu.net";
|
||||
description = "Open-source multi-system emulator with a focus on accuracy and preservation";
|
||||
license = lib.licenses.isc;
|
||||
mainProgram = "ares";
|
||||
maintainers = with lib.maintainers; [
|
||||
Madouura
|
||||
AndersonTorres
|
||||
];
|
||||
platforms = lib.platforms.unix;
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
})
|
||||
# TODO: select between Qt and GTK3
|
||||
# TODO: call Darwin hackers to deal with specific errors
|
112
pkgs/by-name/bs/bsnes-hd/package.nix
Normal file
112
pkgs/by-name/bs/bsnes-hd/package.nix
Normal file
@ -0,0 +1,112 @@
|
||||
{
|
||||
lib,
|
||||
SDL2,
|
||||
alsa-lib,
|
||||
apple-sdk_11,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
gtk3,
|
||||
gtksourceview3,
|
||||
libX11,
|
||||
libXv,
|
||||
libao,
|
||||
libicns,
|
||||
libpulseaudio,
|
||||
makeWrapper,
|
||||
openal,
|
||||
pkg-config,
|
||||
stdenv,
|
||||
udev,
|
||||
unstableGitUpdater,
|
||||
wrapGAppsHook3,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "bsnes-hd";
|
||||
version = "10.6-unstable-2024-10-21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "DerKoun";
|
||||
repo = "bsnes-hd";
|
||||
rev = "0bb7b8645e22ea2476cabd58f32e987b14686601";
|
||||
hash = "sha256-YzWSZMn6v5hWIHnp6KmmpevCsf35Vi2BCcmFMnrFPH0=";
|
||||
};
|
||||
|
||||
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.
|
||||
./patches/0000-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.
|
||||
./patches/0001-macos-copy-app-to-prefix.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs =
|
||||
[ pkg-config ]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ wrapGAppsHook3 ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
libicns
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
SDL2
|
||||
libao
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
libX11
|
||||
libXv
|
||||
udev
|
||||
gtk3
|
||||
gtksourceview3
|
||||
alsa-lib
|
||||
openal
|
||||
libpulseaudio
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_11 ];
|
||||
|
||||
makeFlags =
|
||||
[
|
||||
"-C bsnes"
|
||||
"prefix=$(out)"
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ "hiro=gtk3" ]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [ "hiro=cocoa" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
mkdir -p $out/bin
|
||||
makeWrapper $out/{Applications/bsnes.app/Contents/MacOS,bin}/bsnes
|
||||
'';
|
||||
|
||||
# https://github.com/bsnes-emu/bsnes/issues/107
|
||||
preFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
gappsWrapperArgs+=(
|
||||
--prefix GDK_BACKEND : x11
|
||||
)
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = unstableGitUpdater { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/DerKoun/bsnes-hd";
|
||||
description = "Fork of bsnes that adds HD video features";
|
||||
license = lib.licenses.gpl3Only;
|
||||
mainProgram = "bsnes";
|
||||
maintainers = with lib.maintainers; [
|
||||
AndersonTorres
|
||||
stevebob
|
||||
];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
@ -1,160 +1,175 @@
|
||||
{ lib
|
||||
, SDL2
|
||||
, alsa-lib
|
||||
, darwin
|
||||
, fetchFromGitHub
|
||||
, gtk3
|
||||
, gtksourceview3
|
||||
, libGL
|
||||
, libGLU
|
||||
, libX11
|
||||
, libXv
|
||||
, libao
|
||||
, libicns
|
||||
, libpulseaudio
|
||||
, openal
|
||||
, pkg-config
|
||||
, runtimeShell
|
||||
, stdenv
|
||||
, udev
|
||||
, unstableGitUpdater
|
||||
{
|
||||
lib,
|
||||
SDL2,
|
||||
alsa-lib,
|
||||
fetchFromGitHub,
|
||||
gtk3,
|
||||
gtksourceview3,
|
||||
libGL,
|
||||
libGLU,
|
||||
libX11,
|
||||
libXv,
|
||||
libao,
|
||||
libicns,
|
||||
libpulseaudio,
|
||||
openal,
|
||||
installShellFiles,
|
||||
pkg-config,
|
||||
runtimeShell,
|
||||
stdenv,
|
||||
udev,
|
||||
unstableGitUpdater,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "higan";
|
||||
version = "115-unstable-2024-02-17";
|
||||
version = "115-unstable-2024-09-04";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "higan-emu";
|
||||
repo = "higan";
|
||||
rev = "ba4b918c0bbcc302e0d5d2ed70f2c56214d62681";
|
||||
hash = "sha256-M8WaPrOPSRKxhYcf6ffNkDzITkCltNF9c/zl0GmfJrI=";
|
||||
rev = "a03b2e94c620eb12ab6f9936aee50e4389bee2ff";
|
||||
hash = "sha256-VpwHjA0LufKDnGRAS906Qh3R2pVt4uUGXxsRcca9SyM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
libicns
|
||||
];
|
||||
nativeBuildInputs =
|
||||
[
|
||||
installShellFiles
|
||||
pkg-config
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
libicns
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
SDL2
|
||||
libao
|
||||
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
alsa-lib
|
||||
gtk3
|
||||
gtksourceview3
|
||||
libGL
|
||||
libGLU
|
||||
libX11
|
||||
libXv
|
||||
libpulseaudio
|
||||
openal
|
||||
udev
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||
Carbon
|
||||
Cocoa
|
||||
OpenAL
|
||||
OpenGL
|
||||
]);
|
||||
buildInputs =
|
||||
[
|
||||
SDL2
|
||||
libao
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
alsa-lib
|
||||
gtk3
|
||||
gtksourceview3
|
||||
libGL
|
||||
libGLU
|
||||
libX11
|
||||
libXv
|
||||
libpulseaudio
|
||||
openal
|
||||
udev
|
||||
];
|
||||
|
||||
patches = [
|
||||
# Includes cmath header
|
||||
./001-include-cmath.patch
|
||||
./patches/0001-include-cmath.patch
|
||||
# Uses png2icns instead of sips
|
||||
./002-sips-to-png2icns.patch
|
||||
./patches/0002-sips-to-png2icns.patch
|
||||
];
|
||||
|
||||
dontConfigure = true;
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
buildPhase = let
|
||||
platform =
|
||||
if stdenv.hostPlatform.isLinux
|
||||
then "linux"
|
||||
else if stdenv.hostPlatform.isDarwin
|
||||
then "macos"
|
||||
else if stdenv.hostPlatform.isBSD
|
||||
then "bsd"
|
||||
else if stdenv.hostPlatform.isWindows
|
||||
then "windows"
|
||||
else throw "Unknown platform for higan: ${stdenv.hostPlatform.system}";
|
||||
in ''
|
||||
runHook preBuild
|
||||
|
||||
make -C higan-ui -j$NIX_BUILD_CORES \
|
||||
compiler=${stdenv.cc.targetPrefix}c++ \
|
||||
platform=${platform} \
|
||||
openmp=true \
|
||||
hiro=gtk3 \
|
||||
build=accuracy \
|
||||
local=false \
|
||||
cores="cv fc gb gba md ms msx ngp pce sfc sg ws"
|
||||
|
||||
make -C icarus -j$NIX_BUILD_CORES \
|
||||
compiler=${stdenv.cc.targetPrefix}c++ \
|
||||
platform=${platform} \
|
||||
openmp=true \
|
||||
hiro=gtk3
|
||||
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
'' + (if stdenv.hostPlatform.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
|
||||
buildPhase =
|
||||
let
|
||||
dest = if stdenv.hostPlatform.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}
|
||||
platform =
|
||||
if stdenv.hostPlatform.isLinux then
|
||||
"linux"
|
||||
else if stdenv.hostPlatform.isDarwin then
|
||||
"macos"
|
||||
else if stdenv.hostPlatform.isBSD then
|
||||
"bsd"
|
||||
else if stdenv.hostPlatform.isWindows then
|
||||
"windows"
|
||||
else
|
||||
throw "Unknown platform for higan: ${stdenv.hostPlatform.system}";
|
||||
in
|
||||
''
|
||||
runHook preBuild
|
||||
|
||||
cp --recursive --update ${placeholder "out"}/share/higan/System/ "${dest}"/
|
||||
make -C higan-ui -j$NIX_BUILD_CORES \
|
||||
compiler=${stdenv.cc.targetPrefix}c++ \
|
||||
platform=${platform} \
|
||||
openmp=true \
|
||||
hiro=gtk3 \
|
||||
build=accuracy \
|
||||
local=false \
|
||||
cores="cv fc gb gba md ms msx ngp pce sfc sg ws"
|
||||
|
||||
EOF
|
||||
make -C icarus -j$NIX_BUILD_CORES \
|
||||
compiler=${stdenv.cc.targetPrefix}c++ \
|
||||
platform=${platform} \
|
||||
openmp=true \
|
||||
hiro=gtk3
|
||||
|
||||
chmod +x ${placeholder "out"}/bin/higan-init.sh
|
||||
'') + ''
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
installPhase =
|
||||
''
|
||||
runHook preInstall
|
||||
|
||||
passthru.updateScript = unstableGitUpdater {};
|
||||
''
|
||||
+ (
|
||||
if stdenv.hostPlatform.isDarwin then
|
||||
''
|
||||
mkdir $out
|
||||
mv higan/out/higan.app $out/
|
||||
mv icarus/out/icarus.app $out/
|
||||
''
|
||||
else
|
||||
''
|
||||
installBin higan-ui/out/higan icarus/out/icarus
|
||||
|
||||
meta = with lib; {
|
||||
install -d $out/share/applications
|
||||
install higan-ui/resource/higan.desktop -t $out/share/applications/
|
||||
install icarus/resource/icarus.desktop -t $out/share/applications/
|
||||
|
||||
install -d $out/share/pixmaps
|
||||
install higan/higan/resource/higan.svg $out/share/pixmaps/higan-icon.svg
|
||||
install higan/higan/resource/logo.png $out/share/pixmaps/higan-icon.png
|
||||
install icarus/resource/icarus.svg $out/share/pixmaps/icarus-icon.svg
|
||||
install icarus/resource/icarus.png $out/share/pixmaps/icarus-icon.png
|
||||
''
|
||||
)
|
||||
+ ''
|
||||
install -d $out/share/higan
|
||||
cp -rd extras/ higan/System/ $out/share/higan/
|
||||
|
||||
install -d $out/share/icarus
|
||||
cp -rd icarus/Database icarus/Firmware $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.hostPlatform.isDarwin then
|
||||
"\\$HOME/Library/Application Support/higan"
|
||||
else
|
||||
"\\$HOME/higan";
|
||||
in
|
||||
''
|
||||
mkdir -p $out/bin
|
||||
cat <<EOF > $out/bin/higan-init.sh
|
||||
#!${runtimeShell}
|
||||
|
||||
cp --recursive --update $out/share/higan/System/ "${dest}"/
|
||||
|
||||
EOF
|
||||
|
||||
chmod +x $out/bin/higan-init.sh
|
||||
''
|
||||
)
|
||||
+ ''
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = unstableGitUpdater { };
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/higan-emu/higan";
|
||||
description = "Open-source, cycle-accurate multi-system emulator";
|
||||
longDescription = ''
|
||||
@ -168,10 +183,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
Neo Geo Pocket Color, WonderSwan, WonderSwan Color, SwanCrystal, Pocket
|
||||
Challenge V2.
|
||||
'';
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ AndersonTorres ];
|
||||
platforms = platforms.unix;
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = with lib.maintainers; [ AndersonTorres ];
|
||||
platforms = lib.platforms.unix;
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
})
|
||||
# TODO: select between Qt and GTK3
|
||||
# TODO: call Darwin hackers to deal with respective problems
|
||||
|
@ -1440,10 +1440,6 @@ with pkgs;
|
||||
|
||||
### APPLICATIONS/EMULATORS/BSNES
|
||||
|
||||
ares = darwin.apple_sdk_11_0.callPackage ../applications/emulators/bsnes/ares { };
|
||||
|
||||
bsnes-hd = darwin.apple_sdk_11_0.callPackage ../applications/emulators/bsnes/bsnes-hd { };
|
||||
|
||||
### APPLICATIONS/EMULATORS/DOLPHIN-EMU
|
||||
|
||||
dolphin-emu = qt6Packages.callPackage ../applications/emulators/dolphin-emu {
|
||||
|
Loading…
Reference in New Issue
Block a user