rpcs3: 0.0.16-12235-a4f4b81e6 -> 0.0.19-12975-37383f421
* De-vendor FAudio, WolfSSL, pugixml, and flatbuffers * Add update script * Add myself as maintainer
This commit is contained in:
parent
1f9783a39b
commit
659e4b7457
@ -1,6 +1,6 @@
|
|||||||
{ mkDerivation, lib, fetchFromGitHub, cmake, pkg-config, git
|
{ gcc11Stdenv, lib, fetchFromGitHub, wrapQtAppsHook, cmake, pkg-config, git
|
||||||
, qtbase, qtquickcontrols, openal, glew, vulkan-headers, vulkan-loader, libpng
|
, qtbase, qtquickcontrols, qtmultimedia, openal, glew, vulkan-headers, vulkan-loader, libpng
|
||||||
, ffmpeg, libevdev, libusb1, zlib, curl, python3
|
, ffmpeg, libevdev, libusb1, zlib, curl, wolfssl, python3, pugixml, faudio, flatbuffers
|
||||||
, sdl2Support ? true, SDL2
|
, sdl2Support ? true, SDL2
|
||||||
, pulseaudioSupport ? true, libpulseaudio
|
, pulseaudioSupport ? true, libpulseaudio
|
||||||
, waylandSupport ? true, wayland
|
, waylandSupport ? true, wayland
|
||||||
@ -8,21 +8,23 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
majorVersion = "0.0.16";
|
majorVersion = "0.0.19";
|
||||||
gitVersion = "12235-a4f4b81e6"; # echo $(git rev-list HEAD --count)-$(git rev-parse --short HEAD)
|
gitVersion = "12975-37383f421";
|
||||||
in
|
in
|
||||||
mkDerivation {
|
gcc11Stdenv.mkDerivation {
|
||||||
pname = "rpcs3";
|
pname = "rpcs3";
|
||||||
version = "${majorVersion}-${gitVersion}";
|
version = "${majorVersion}-${gitVersion}";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "RPCS3";
|
owner = "RPCS3";
|
||||||
repo = "rpcs3";
|
repo = "rpcs3";
|
||||||
rev = "a4f4b81e6b0c00f4c30f9f5f182e5fe56f9fb03c";
|
rev = "37383f4217e1c510a543e100d0ca495800b3361a";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
sha256 = "1d70nljl1kmpbk50jpjki7dglw1bbxd7x4qzg6nz5np2sdsbpckd";
|
sha256 = "1pm1r4j4cdcmr8xmslyv2n6iwcjldnr396by4r6lgf4mdlnwahhm";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
passthru.updateScript = ./update.sh;
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
cat > ./rpcs3/git-version.h <<EOF
|
cat > ./rpcs3/git-version.h <<EOF
|
||||||
#define RPCS3_GIT_VERSION "${gitVersion}"
|
#define RPCS3_GIT_VERSION "${gitVersion}"
|
||||||
@ -38,16 +40,18 @@ mkDerivation {
|
|||||||
"-DUSE_SYSTEM_LIBPNG=ON"
|
"-DUSE_SYSTEM_LIBPNG=ON"
|
||||||
"-DUSE_SYSTEM_FFMPEG=ON"
|
"-DUSE_SYSTEM_FFMPEG=ON"
|
||||||
"-DUSE_SYSTEM_CURL=ON"
|
"-DUSE_SYSTEM_CURL=ON"
|
||||||
# NB: Can't use this yet, our CMake doesn't include FindWolfSSL.cmake
|
"-DUSE_SYSTEM_WOLFSSL=ON"
|
||||||
#"-DUSE_SYSTEM_WOLFSSL=ON"
|
"-DUSE_SYSTEM_FAUDIO=ON"
|
||||||
|
"-DUSE_SYSTEM_PUGIXML=ON"
|
||||||
|
"-DUSE_SYSTEM_FLATBUFFERS=ON"
|
||||||
"-DUSE_NATIVE_INSTRUCTIONS=OFF"
|
"-DUSE_NATIVE_INSTRUCTIONS=OFF"
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake pkg-config git ];
|
nativeBuildInputs = [ cmake pkg-config git wrapQtAppsHook ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
qtbase qtquickcontrols openal glew vulkan-headers vulkan-loader libpng ffmpeg
|
qtbase qtquickcontrols qtmultimedia openal glew vulkan-headers vulkan-loader libpng ffmpeg
|
||||||
libevdev zlib libusb1 curl python3
|
libevdev zlib libusb1 curl wolfssl python3 pugixml faudio flatbuffers
|
||||||
] ++ lib.optional sdl2Support SDL2
|
] ++ lib.optional sdl2Support SDL2
|
||||||
++ lib.optional pulseaudioSupport libpulseaudio
|
++ lib.optional pulseaudioSupport libpulseaudio
|
||||||
++ lib.optional alsaSupport alsa-lib
|
++ lib.optional alsaSupport alsa-lib
|
||||||
@ -56,7 +60,7 @@ mkDerivation {
|
|||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "PS3 emulator/debugger";
|
description = "PS3 emulator/debugger";
|
||||||
homepage = "https://rpcs3.net/";
|
homepage = "https://rpcs3.net/";
|
||||||
maintainers = with maintainers; [ abbradar neonfuz ilian ];
|
maintainers = with maintainers; [ abbradar neonfuz ilian zane ];
|
||||||
license = licenses.gpl2Only;
|
license = licenses.gpl2Only;
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
};
|
};
|
||||||
|
56
pkgs/misc/emulators/rpcs3/update.sh
Executable file
56
pkgs/misc/emulators/rpcs3/update.sh
Executable file
@ -0,0 +1,56 @@
|
|||||||
|
#!/usr/bin/env nix-shell
|
||||||
|
#!nix-shell -i bash -p gnused jq nix-prefetch-git curl
|
||||||
|
|
||||||
|
set -eou pipefail
|
||||||
|
|
||||||
|
ROOT="$(dirname "$(readlink -f "$0")")"
|
||||||
|
if [[ ! "$(basename $ROOT)" == "rpcs3" || ! -f "$ROOT/default.nix" ]]; then
|
||||||
|
echo "ERROR: Not in the rpcs3 folder"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -v GITHUB_TOKEN ]]; then
|
||||||
|
echo "ERROR: \$GITHUB_TOKEN not set"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
PAYLOAD=$(jq -cn --rawfile query /dev/stdin '{"query": $query}' <<EOF | curl -s -H "Authorization: bearer $GITHUB_TOKEN" -d '@-' https://api.github.com/graphql
|
||||||
|
{
|
||||||
|
repository(owner: "RPCS3", name: "rpcs3") {
|
||||||
|
branch: ref(qualifiedName: "refs/heads/master") {
|
||||||
|
target {
|
||||||
|
oid
|
||||||
|
... on Commit {
|
||||||
|
history {
|
||||||
|
totalCount
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tag: refs(refPrefix: "refs/tags/", first: 1, orderBy: {field: TAG_COMMIT_DATE, direction: DESC}) {
|
||||||
|
nodes {
|
||||||
|
name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
)
|
||||||
|
RPCS3_COMMIT=$(jq -r .data.repository.branch.target.oid <<< "$PAYLOAD")
|
||||||
|
RPCS3_MAJORVER=$(jq -r .data.repository.tag.nodes[0].name <<< "$PAYLOAD" | sed 's/^v//g')
|
||||||
|
RPCS3_COUNT=$(jq -r .data.repository.branch.target.history.totalCount <<< "$PAYLOAD")
|
||||||
|
|
||||||
|
RPCS3_GITVER="$RPCS3_COUNT-${RPCS3_COMMIT::9}"
|
||||||
|
echo "INFO: Latest commit is $RPCS3_COMMIT"
|
||||||
|
echo "INFO: Latest version is $RPCS3_MAJORVER-$RPCS3_GITVER"
|
||||||
|
|
||||||
|
RPCS3_SHA256=$(nix-prefetch-git --quiet --fetch-submodules https://github.com/RPCS3/rpcs3.git "$RPCS3_COMMIT" | jq -r .sha256)
|
||||||
|
echo "INFO: SHA256 is $RPCS3_SHA256"
|
||||||
|
|
||||||
|
sed -i -E \
|
||||||
|
-e "s/majorVersion\s+.+$/majorVersion = \"${RPCS3_MAJORVER}\";/g" \
|
||||||
|
-e "s/gitVersion\s+.+$/gitVersion = \"${RPCS3_GITVER}\";/g" \
|
||||||
|
-e "s/rev\s*=\s*\"[a-z0-9]+\";$/rev = \"${RPCS3_COMMIT}\";/g" \
|
||||||
|
-e "s/sha256\s*=\s*\"[a-z0-9]+\";$/sha256 = \"${RPCS3_SHA256}\";/g" \
|
||||||
|
"$ROOT/default.nix"
|
Loading…
Reference in New Issue
Block a user