From c367662b51caaaffd410a8194ff9e9b6797bc0b6 Mon Sep 17 00:00:00 2001 From: Shelvacu Date: Tue, 24 Sep 2024 16:07:18 -0700 Subject: [PATCH] requireFile-less coopdx --- coopdx2.nix | 11 +++-------- flake.lock | 16 ++++++++++++++++ flake.nix | 2 ++ 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/coopdx2.nix b/coopdx2.nix index fea6b42..bf53c50 100644 --- a/coopdx2.nix +++ b/coopdx2.nix @@ -12,12 +12,7 @@ lib, bash, python3, - requireFile, - baseRom ? requireFile { - name = "baserom.us.z64"; - message = "bla"; - sha256 = "17ce077343c6133f8c9f2d6d6d9a4ab62c8cd2aa57c40aea1f490b4c8bb21d91"; - }, + sm64baserom, enableTextureFix ? true, enableDiscord ? false, @@ -75,7 +70,7 @@ stdenv.mkDerivation { ]; preBuild = '' - ln -s ${baseRom} baserom.us.z64 + ln -s ${sm64baserom} baserom.us.z64 substituteInPlace Makefile \ --replace-fail ' -march=$(TARGET_ARCH) ' ' ' # workaround a bug in the build @@ -93,7 +88,7 @@ stdenv.mkDerivation { mkdir -p $share cp $built/${pname} $share/${pname}-unwrapped cp -r $built/{dynos,lang,mods,palettes} $share - ln -s ${baseRom} $share/baserom.us.z64 + ln -s ${sm64baserom} $share/baserom.us.z64 ${lib.optionalString enableDiscord '' cp $built/libdiscord_game_sdk* $share diff --git a/flake.lock b/flake.lock index 109b444..f791e23 100644 --- a/flake.lock +++ b/flake.lock @@ -1289,6 +1289,7 @@ "nixvim": "nixvim", "nixvim-unstable": "nixvim-unstable", "padtype-unstable": "padtype-unstable", + "sm64baserom": "sm64baserom", "sops-nix": "sops-nix", "vscode-server": "vscode-server", "vscode-server-unstable": "vscode-server-unstable" @@ -1406,6 +1407,21 @@ "type": "github" } }, + "sm64baserom": { + "locked": { + "lastModified": 1727217362, + "narHash": "sha256-Ws5dVa/7kFnesEkZsRPJmqnYKNlBYm7fx49KgT73bS8=", + "ref": "refs/heads/master", + "rev": "aeb2d33ee623ede8c88f0f492c80f437889adfe1", + "revCount": 1, + "type": "git", + "url": "https://git.uninsane.org/shelvacu/sm64baserom.git" + }, + "original": { + "type": "git", + "url": "https://git.uninsane.org/shelvacu/sm64baserom.git" + } + }, "sops-nix": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index 1aeb279..eaef34c 100644 --- a/flake.nix +++ b/flake.nix @@ -85,6 +85,7 @@ url = "github:tpwrules/nixos-apple-silicon"; inputs.nixpkgs.follows = "nixpkgs-unstable"; }; + sm64baserom.url = "git+https://git.uninsane.org/shelvacu/sm64baserom.git"; }; outputs = @@ -308,6 +309,7 @@ pkgs = import nixpkgs { inherit system; config.allowUnfree = true; + overlays = [ inputs.sm64baserom.overlays.default ]; }; in {