mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
papermc: fix version/hash overrides
Reintroduces the use of finalAttrs that was introduced ind0bb02b106
and erroneously removed inef321a0ed6
.
This commit is contained in:
parent
2282f6f5e1
commit
85f544d85e
@ -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";
|
||||
};
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user