From 85f544d85e92e86b30f9e2c4327f3cd44b51bcbe Mon Sep 17 00:00:00 2001 From: Majiir Paktu Date: Sun, 17 Mar 2024 16:44:35 -0400 Subject: [PATCH] papermc: fix version/hash overrides Reintroduces the use of finalAttrs that was introduced in d0bb02b106d4fb00445e71253df34497ffd556cc and erroneously removed in ef321a0ed68ccc8b0babaca977303ff5528e8fa5. --- pkgs/games/papermc/derivation.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/games/papermc/derivation.nix b/pkgs/games/papermc/derivation.nix index d6bce24443e6..50796407c297 100644 --- a/pkgs/games/papermc/derivation.nix +++ b/pkgs/games/papermc/derivation.nix @@ -1,18 +1,18 @@ { lib, stdenvNoCC, fetchurl, makeBinaryWrapper, jre, version, hash }: -stdenvNoCC.mkDerivation { +stdenvNoCC.mkDerivation (finalAttrs: { pname = "papermc"; - inherit version; + inherit version hash; src = let - version-split = lib.strings.splitString "-" version; + version-split = lib.strings.splitString "-" finalAttrs.version; mcVersion = builtins.elemAt version-split 0; buildNum = builtins.elemAt version-split 1; in fetchurl { url = "https://papermc.io/api/v2/projects/paper/versions/${mcVersion}/builds/${buildNum}/downloads/paper-${mcVersion}-${buildNum}.jar"; - inherit hash; + inherit (finalAttrs) hash; }; installPhase = '' @@ -47,4 +47,4 @@ stdenvNoCC.mkDerivation { maintainers = with lib.maintainers; [ aaronjanse neonfuz MayNiklas ]; mainProgram = "minecraft-server"; }; -} +})