mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
pre-format
This commit is contained in:
parent
3ad599c6aa
commit
de7683556e
21 changed files with 462 additions and 403 deletions
7
packages/fzf-tab.nix
Normal file
7
packages/fzf-tab.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{fetchFromGitHub}:
|
||||
fetchFromGitHub {
|
||||
owner = "Aloxaf";
|
||||
repo = "fzf-tab";
|
||||
rev = "c2b4aa5ad2532cca91f23908ac7f00efb7ff09c9";
|
||||
hash = "sha256-gvZp8P3quOtcy1Xtt1LAW1cfZ/zCtnAmnWqcwrKel6w=";
|
||||
}
|
||||
|
|
@ -1,45 +1,40 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
runCommandNoCC,
|
||||
makeBinaryWrapper,
|
||||
fetchurl,
|
||||
bash,
|
||||
jre,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
}: let
|
||||
pname = "papermc";
|
||||
version = "1.20.1.83";
|
||||
in
|
||||
runCommandNoCC "papermc" {
|
||||
inherit pname version;
|
||||
|
||||
jar = let
|
||||
mcVersion = lib.versions.pad 3 finalAttrs.version;
|
||||
buildNum = builtins.elemAt (lib.versions.splitVersion finalAttrs.version) 3;
|
||||
in
|
||||
fetchurl {
|
||||
url = "https://papermc.io/api/v2/projects/paper/versions/${mcVersion}/builds/${buildNum}/downloads/paper-${mcVersion}-${buildNum}.jar";
|
||||
sha256 = "sha256-HQpc3MOXa1wkXqgm9ciQj04FUIyuupnYiu+2RZ/sXE4=";
|
||||
src = let
|
||||
mcVersion = lib.versions.pad 3 version;
|
||||
buildNum = builtins.elemAt (lib.versions.splitVersion version) 3;
|
||||
in
|
||||
fetchurl {
|
||||
url = "https://papermc.io/api/v2/projects/paper/versions/${mcVersion}/builds/${buildNum}/downloads/paper-${mcVersion}-${buildNum}.jar";
|
||||
hash = "sha256-HQpc3MOXa1wkXqgm9ciQj04FUIyuupnYiu+2RZ/sXE4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [makeBinaryWrapper];
|
||||
|
||||
meta = {
|
||||
description = "High-performance Minecraft Server";
|
||||
homepage = "https://papermc.io/";
|
||||
sourceProvenance = with lib.sourceTypes; [binaryBytecode];
|
||||
license = lib.licenses.gpl3Only;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [aaronjanse neonfuz];
|
||||
mainProgram = "minecraft-server";
|
||||
};
|
||||
preferLocalBuild = true;
|
||||
}
|
||||
''
|
||||
install -D $src $out/share/papermc/papermc.jar
|
||||
makeWrapper ${lib.getExe jre} "$out/bin/minecraft-server" \
|
||||
--append-flags "-jar $out/share/papermc/papermc.jar nogui"
|
||||
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
|
||||
buildPhase = ''
|
||||
cat > minecraft-server << EOF
|
||||
#!${bash}/bin/sh
|
||||
exec ${jre}/bin/java \$@ -jar $out/share/papermc/papermc.jar nogui
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm444 ${finalAttrs.jar} $out/share/papermc/papermc.jar
|
||||
install -Dm555 -t $out/bin minecraft-server
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "High-performance Minecraft Server";
|
||||
homepage = "https://papermc.io/";
|
||||
sourceProvenance = with lib.sourceTypes; [binaryBytecode];
|
||||
license = lib.licenses.gpl3Only;
|
||||
platforms = lib.platforms.unix;
|
||||
maintainers = with lib.maintainers; [aaronjanse neonfuz];
|
||||
mainProgram = "minecraft-server";
|
||||
};
|
||||
})
|
||||
''
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
stdenv,
|
||||
writeShellScriptBin,
|
||||
fetchzip,
|
||||
glibc,
|
||||
}: let
|
||||
src = fetchzip {
|
||||
url = "https://github.com/trexminer/T-Rex/releases/download/0.26.8/t-rex-0.26.8-linux.tar.gz";
|
||||
sha256 = "sha256-qM/YIMqcntVYD8zJGCORQgIn1h4J4CDobyXwcdK3li8=";
|
||||
stripRoot = false;
|
||||
};
|
||||
in
|
||||
writeShellScriptBin "t-rex"
|
||||
''
|
||||
LD_LIBRARY_PATH=${stdenv.cc.cc.lib}/lib/:${glibc}/lib/:/run/opengl-driver/lib/
|
||||
exec ${glibc}/lib64/ld-linux-x86-64.so.2 \
|
||||
${src}/t-rex --no-watchdog "$@"
|
||||
''
|
||||
Loading…
Add table
Add a link
Reference in a new issue