Skip to content

Commit

Permalink
feat(pkgs/yuzu): use suyu source to build yuzu
Browse files Browse the repository at this point in the history
  • Loading branch information
wrvsrx committed May 5, 2024
1 parent a5386f7 commit cebe8bb
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 42 deletions.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
overlays = [ inputs.pnpm2nix-nzbr.overlays.default ];
};
packages = pkgs-to-packages pkgs;
checks = builtins.removeAttrs packages [ "yuzu-early-access" ];
checks = builtins.removeAttrs packages [ "suyu" ];
formatter = pkgs.nixfmt-rfc-style;
devShells.default = pkgs.mkShell { nativeBuildInputs = [ pkgs.nvfetcher ]; };
};
Expand Down
6 changes: 3 additions & 3 deletions pkgs/to-normal-packages/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ pkgs, to-sources }:
let
inherit (pkgs) callPackage qt6Packages;
inherit (pkgs) callPackage;
sources = to-sources { inherit pkgs; };
callIFD = import ../callIFD.nix;
in
Expand Down Expand Up @@ -43,9 +43,9 @@ rec {
yalantinglibs = callPackage ./yalantinglibs { source = sources.yalantinglibs; };
nx_tzdb = callPackage ./nx_tzdb { source = sources.nx_tzdb; };
compat-list = callPackage ./compat-list { source = sources.compat-list; };
yuzu-early-access = import ./yuzu {
yuzu = import ./yuzu {
sources = {
inherit (sources) yuzu nx_tzdb compat-list;
inherit (sources) suyu nx_tzdb compat-list;
};
inherit pkgs;
};
Expand Down
2 changes: 1 addition & 1 deletion pkgs/to-normal-packages/yuzu/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ let
nx_tzdb = callPackage ./nx_tzdb { source = sources.nx_tzdb; };
compat-list = callPackage ./compat-list { source = sources.compat-list; };
yuzu = qt6Packages.callPackage ./yuzu {
source = sources.yuzu;
source = sources.suyu;
inherit nx_tzdb compat-list;
};
in
Expand Down
10 changes: 8 additions & 2 deletions pkgs/to-normal-packages/yuzu/yuzu/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,16 @@
yasm,
zlib,
zstd,
gitMinimal,
source,
}:
stdenv.mkDerivation (finalAttrs: {
inherit (source) pname version src;
pname = "yuzu";
version = "4716";
inherit (source) src;

nativeBuildInputs = [
gitMinimal
cmake
glslang
pkg-config
Expand Down Expand Up @@ -130,6 +134,8 @@ stdenv.mkDerivation (finalAttrs: {
qtWrapperArgs = [ "--prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib" ];

preConfigure = ''
git reset 15e6e48bef0216480661444a8d8b348c1cca47bb --hard
git submodule update
# see https://github.com/NixOS/nixpkgs/issues/114044, setting this through cmakeFlags does not work.
cmakeFlagsArray+=(
"-DTITLE_BAR_FORMAT_IDLE=${finalAttrs.pname} | ${finalAttrs.version} (nixpkgs) {}"
Expand All @@ -147,7 +153,7 @@ stdenv.mkDerivation (finalAttrs: {
'';

postInstall = ''
install -Dm444 $src/dist/72-yuzu-input.rules $out/lib/udev/rules.d/72-yuzu-input.rules
install -Dm444 ../dist/72-yuzu-input.rules $out/lib/udev/rules.d/72-yuzu-input.rules
'';

passthru.updateScript = nix-update-script {
Expand Down
39 changes: 19 additions & 20 deletions pkgs/to-sources/_sources/generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,25 @@
},
"version": "v0.1.3"
},
"suyu": {
"cargoLocks": null,
"date": null,
"extract": null,
"name": "suyu",
"passthru": null,
"pinned": false,
"src": {
"deepClone": true,
"fetchSubmodules": true,
"leaveDotGit": true,
"name": null,
"rev": "42f3dd309e8d89aef74344c5a66d0d1c7d7789a4",
"sha256": "sha256-B15AaXjfr+Ux/+f1Van3LIIFZ6AsM8vT4lHDgGbEWAE=",
"type": "git",
"url": "https://git.suyu.dev/suyu/suyu"
},
"version": "42f3dd309e8d89aef74344c5a66d0d1c7d7789a4"
},
"taskwarrior-utils": {
"cargoLocks": null,
"date": "2024-04-03",
Expand Down Expand Up @@ -697,25 +716,5 @@
"type": "github"
},
"version": "v0.3.0"
},
"yuzu": {
"cargoLocks": null,
"date": "2024-03-15",
"extract": null,
"name": "yuzu",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": true,
"leaveDotGit": false,
"name": null,
"owner": "yuzu-mirror",
"repo": "yuzu",
"rev": "4ad024d2fc9d12a131d69deb1b07b7be36dc4f17",
"sha256": "sha256-YxPbzqgQ8Hh2evs+57LSnvOWrVIm1ukaCWzlzB6otk4=",
"type": "github"
},
"version": "4ad024d2fc9d12a131d69deb1b07b7be36dc4f17"
}
}
24 changes: 12 additions & 12 deletions pkgs/to-sources/_sources/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,18 @@
sha256 = "sha256-AyWtJ+EyTN2LEXLM5OSQB3ITzqLLRoirzkWnjwLHOIA=";
};
};
suyu = {
pname = "suyu";
version = "42f3dd309e8d89aef74344c5a66d0d1c7d7789a4";
src = fetchgit {
url = "https://git.suyu.dev/suyu/suyu";
rev = "42f3dd309e8d89aef74344c5a66d0d1c7d7789a4";
fetchSubmodules = true;
deepClone = true;
leaveDotGit = true;
sha256 = "sha256-B15AaXjfr+Ux/+f1Van3LIIFZ6AsM8vT4lHDgGbEWAE=";
};
};
taskwarrior-utils = {
pname = "taskwarrior-utils";
version = "911ff711c665153b3ed9ba409671e674797eb481";
Expand Down Expand Up @@ -411,16 +423,4 @@
sha256 = "sha256-Su3mnC7hsw0T0u6HfsnYAwXml2T7CABySv7a18+KnK0=";
};
};
yuzu = {
pname = "yuzu";
version = "4ad024d2fc9d12a131d69deb1b07b7be36dc4f17";
src = fetchFromGitHub {
owner = "yuzu-mirror";
repo = "yuzu";
rev = "4ad024d2fc9d12a131d69deb1b07b7be36dc4f17";
fetchSubmodules = true;
sha256 = "sha256-YxPbzqgQ8Hh2evs+57LSnvOWrVIm1ukaCWzlzB6otk4=";
};
date = "2024-03-15";
};
}
9 changes: 6 additions & 3 deletions pkgs/to-sources/nvfetcher.toml
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,13 @@ fetch.github = "MetaCubeX/metacubexd"
src.git = "https://github.com/z4yx/GoAuthing"
fetch.github = "z4yx/GoAuthing"

[yuzu]
src.git = "https://github.com/yuzu-mirror/yuzu"
[suyu]
# Its submodules has been redirected to a forked version
src.manual = "42f3dd309e8d89aef74344c5a66d0d1c7d7789a4"
git.fetchSubmodules = true
fetch.github = "yuzu-mirror/yuzu"
git.leaveDotGit = true
git.deepClone = true
fetch.git = "https://git.suyu.dev/suyu/suyu"

[compat-list]
src.git = "https://github.com/flathub/org.yuzu_emu.yuzu"
Expand Down

0 comments on commit cebe8bb

Please sign in to comment.