diff options
author | Daniël de Kok <me@danieldk.eu> | 2020-08-25 14:41:32 +0200 |
---|---|---|
committer | Daniël de Kok <me@danieldk.eu> | 2020-08-25 14:46:24 +0200 |
commit | 4bb07287605bbe38a868e53892b0868128ab6e7d (patch) | |
tree | 04f2ada476e2a4620467855aca90b18814a7ffa7 /pkgs/games/papermc | |
parent | 7dd3f3d191cf72ac73e9b5b90ae66dbe60b7bbca (diff) | |
download | nixpkgs-4bb07287605bbe38a868e53892b0868128ab6e7d.tar nixpkgs-4bb07287605bbe38a868e53892b0868128ab6e7d.tar.gz nixpkgs-4bb07287605bbe38a868e53892b0868128ab6e7d.tar.bz2 nixpkgs-4bb07287605bbe38a868e53892b0868128ab6e7d.tar.lz nixpkgs-4bb07287605bbe38a868e53892b0868128ab6e7d.tar.xz nixpkgs-4bb07287605bbe38a868e53892b0868128ab6e7d.tar.zst nixpkgs-4bb07287605bbe38a868e53892b0868128ab6e7d.zip |
papermc: cleanup
- Use Nix store path for the shebang to make this work on systems without /bin/sh. - Replace phases by dont*. - Install jar file to $out/share/papermc rather than $out. - License gpl3 -> gpl3Only (couldn't find any evidence that this is gpl3Plus).
Diffstat (limited to 'pkgs/games/papermc')
-rw-r--r-- | pkgs/games/papermc/default.nix | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/pkgs/games/papermc/default.nix b/pkgs/games/papermc/default.nix index c0446c4fa5b..c5f7dc37925 100644 --- a/pkgs/games/papermc/default.nix +++ b/pkgs/games/papermc/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, jre }: +{ stdenv, fetchurl, bash, jre }: let mcVersion = "1.16.2"; buildNum = "141"; @@ -13,22 +13,23 @@ in stdenv.mkDerivation { preferLocalBuild = true; dontUnpack = true; - installPhase = '' - mkdir -p $out/bin - cp ${jar} $out/papermc.jar - cat > $out/bin/minecraft-server << EOF - #!/bin/sh - exec ${jre}/bin/java \$@ -jar $out/papermc.jar nogui - EOF - chmod +x $out/bin/minecraft-server + dontConfigure = true; + + buildPhase = '' + cat > minecraft-server << EOF + #!${bash}/bin/sh + exec ${jre}/bin/java \$@ -jar $out/share/papermc/papermc.jar nogui ''; - phases = "installPhase"; + installPhase = '' + install -Dm444 ${jar} $out/share/papermc/papermc.jar + install -Dm555 -t $out/bin minecraft-server + ''; meta = { description = "High-performance Minecraft Server"; homepage = "https://papermc.io/"; - license = stdenv.lib.licenses.gpl3; + license = stdenv.lib.licenses.gpl3Only; platforms = stdenv.lib.platforms.unix; maintainers = with stdenv.lib.maintainers; [ aaronjanse ]; }; |