add q3a for clients
This commit is contained in:
parent
f139abdcd6
commit
24a3d380a3
|
@ -0,0 +1,5 @@
|
|||
# Clients
|
||||
|
||||
```bash
|
||||
NIXPKGS_ALLOW_UNFREE=1 nix run --extra-experimental-features nix-command\ flakes --impure git+https://gitea.c3d2.de/astro/quakeflake
|
||||
```
|
28
flake.nix
28
flake.nix
|
@ -2,11 +2,19 @@
|
|||
description = "Quake 3 Arena Dedicated Server";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/release-21.11";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/release-22.05";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs }: {
|
||||
|
||||
apps.x86_64-linux = rec {
|
||||
q3a = {
|
||||
type = "app";
|
||||
program = "${self.packages.x86_64-linux.q3a}/bin/q3a";
|
||||
};
|
||||
default = q3a;
|
||||
};
|
||||
|
||||
packages = builtins.mapAttrs (system: _:
|
||||
let
|
||||
inherit (self.nixosConfigurations) quakeserver;
|
||||
|
@ -23,6 +31,24 @@
|
|||
nix copy --to ssh://root@${remote} ${rootfs}
|
||||
ssh root@${remote} ${rootfs}/bin/switch-to-configuration switch
|
||||
'';
|
||||
|
||||
q3a = with nixpkgs.legacyPackages.${system}; buildEnv {
|
||||
name = "q3a";
|
||||
paths = [
|
||||
quake3e
|
||||
(runCommandNoCC "baseq3" {} ''
|
||||
mkdir -p $out/lib/baseq3
|
||||
ln -s ${self.packages.${system}.isoBaseq3}/* $out/lib/baseq3/
|
||||
ln -s ${quake3pointrelease}/baseq3/* $out/lib/baseq3/
|
||||
ln -s ${quake3hires}/baseq3/* $out/lib/baseq3/
|
||||
'')
|
||||
(writeScriptBin "q3a" ''
|
||||
#! ${runtimeShell} -e
|
||||
|
||||
exec $(dirname $0)/quake3e +set fs_basepath $(dirname $0)/../lib
|
||||
'')
|
||||
];
|
||||
};
|
||||
} //
|
||||
import ./pkgs/baseq3.nix (inputs // { inherit system; })
|
||||
) { x86_64-linux = true; };
|
||||
|
|
Loading…
Reference in New Issue