chore(pkgs): Remove starbound package
I haven't used this in years and should probably completely revisit how it works anyway.
This commit is contained in:
parent
56680d5389
commit
cd012e86ba
4 changed files with 0 additions and 72 deletions
|
@ -1,10 +1,8 @@
|
||||||
#!/usr/bin/env nu
|
#!/usr/bin/env nu
|
||||||
|
|
||||||
let shell_files = ls **/*.sh | get name
|
|
||||||
let nix_files = ls **/*.nix | where name !~ "hardware-configuration.nix|_sources" | get name
|
let nix_files = ls **/*.nix | where name !~ "hardware-configuration.nix|_sources" | get name
|
||||||
|
|
||||||
let linters = [
|
let linters = [
|
||||||
([shellcheck] ++ $shell_files)
|
|
||||||
([nixfmt --check --strict] ++ $nix_files)
|
([nixfmt --check --strict] ++ $nix_files)
|
||||||
([deadnix --fail] ++ $nix_files)
|
([deadnix --fail] ++ $nix_files)
|
||||||
([statix check] ++ $nix_files)
|
([statix check] ++ $nix_files)
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ pkgs }:
|
{ pkgs }:
|
||||||
{
|
{
|
||||||
crowdsec = import ./crowdsec { inherit pkgs; };
|
crowdsec = import ./crowdsec { inherit pkgs; };
|
||||||
starbound = pkgs.callPackage ./starbound { };
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,37 +0,0 @@
|
||||||
{
|
|
||||||
stdenv,
|
|
||||||
lib,
|
|
||||||
makeWrapper,
|
|
||||||
patchelf,
|
|
||||||
steamPackages,
|
|
||||||
replace-secret,
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
# Use the directory in which starbound is installed so steamcmd
|
|
||||||
# doesn't have to be reinstalled constantly (we're using DynamicUser
|
|
||||||
# with StateDirectory to persist this).
|
|
||||||
steamcmd = steamPackages.steamcmd.override { steamRoot = "/var/lib/starbound/.steamcmd"; };
|
|
||||||
wrapperPath = lib.makeBinPath [
|
|
||||||
patchelf
|
|
||||||
steamcmd
|
|
||||||
replace-secret
|
|
||||||
];
|
|
||||||
in
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
name = "starbound-update-script";
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
|
||||||
dontUnpack = true;
|
|
||||||
patchPhase = ''
|
|
||||||
interpreter="$(cat $NIX_CC/nix-support/dynamic-linker)"
|
|
||||||
substitute ${./launch-starbound.sh} launch-starbound --subst-var interpreter
|
|
||||||
'';
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp launch-starbound $out/bin/launch-starbound
|
|
||||||
chmod +x $out/bin/launch-starbound
|
|
||||||
'';
|
|
||||||
postFixup = ''
|
|
||||||
wrapProgram $out/bin/launch-starbound \
|
|
||||||
--prefix PATH : "${wrapperPath}"
|
|
||||||
'';
|
|
||||||
}
|
|
|
@ -1,32 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
if ! [[ -v STATE_DIRECTORY && -v CREDENTIALS_DIRECTORY ]]; then
|
|
||||||
echo "Error: Runtime dir or credential not set"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Update the server to the latest version
|
|
||||||
echo "Updating/installing starbound"
|
|
||||||
|
|
||||||
mkdir -p "${STATE_DIRECTORY}/.steamcmd"
|
|
||||||
steamcmd <<EOF
|
|
||||||
force_install_dir $STATE_DIRECTORY
|
|
||||||
login tlater $(cat "$CREDENTIALS_DIRECTORY/steam")
|
|
||||||
app_update 211820
|
|
||||||
quit
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo "Updating config"
|
|
||||||
if [ -f "$1" ]; then
|
|
||||||
mkdir -p ./storage
|
|
||||||
cp "$1" ./storage/starbound_server.config
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Running starbound server"
|
|
||||||
patchelf --set-interpreter '@interpreter@' ./linux/starbound_server
|
|
||||||
# Must be run from the directory that the binary is in (why do game
|
|
||||||
# devs do this?)
|
|
||||||
cd linux
|
|
||||||
./starbound_server
|
|
Loading…
Add table
Add a link
Reference in a new issue