Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
137 lines
2.7 KiB
Nix
137 lines
2.7 KiB
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchFromGitLab,
|
|
openssl,
|
|
libGL,
|
|
vulkan-loader,
|
|
wayland,
|
|
wayland-protocols,
|
|
libxkbcommon,
|
|
libX11,
|
|
libXrandr,
|
|
libXi,
|
|
libXcursor,
|
|
udev,
|
|
alsa-lib,
|
|
stdenv,
|
|
libxcb,
|
|
bzip2,
|
|
cmake,
|
|
fontconfig,
|
|
freetype,
|
|
pkg-config,
|
|
makeWrapper,
|
|
writeShellScript,
|
|
patchelf,
|
|
}:
|
|
let
|
|
version = "0.16.0";
|
|
# Patch for airshipper to install veloren
|
|
patch =
|
|
let
|
|
runtimeLibs = [
|
|
udev
|
|
alsa-lib
|
|
(lib.getLib stdenv.cc.cc)
|
|
libxkbcommon
|
|
libxcb
|
|
libX11
|
|
libXcursor
|
|
libXrandr
|
|
libXi
|
|
vulkan-loader
|
|
libGL
|
|
];
|
|
in
|
|
writeShellScript "patch" ''
|
|
echo "making binaries executable"
|
|
chmod +x {veloren-voxygen,veloren-server-cli}
|
|
echo "patching dynamic linkers"
|
|
${patchelf}/bin/patchelf \
|
|
--set-interpreter "${stdenv.cc.bintools.dynamicLinker}" \
|
|
veloren-server-cli
|
|
${patchelf}/bin/patchelf \
|
|
--set-interpreter "${stdenv.cc.bintools.dynamicLinker}" \
|
|
--set-rpath "${lib.makeLibraryPath runtimeLibs}" \
|
|
veloren-voxygen
|
|
'';
|
|
in
|
|
rustPlatform.buildRustPackage {
|
|
pname = "airshipper";
|
|
inherit version;
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "Veloren";
|
|
repo = "airshipper";
|
|
tag = "v${version}";
|
|
hash = "sha256-MHwyXCAqdBzdJlYzSeUXr6bJdTVHcjJ/kGcuAsZCCW8=";
|
|
};
|
|
|
|
cargoHash = "sha256-TkeB939zV5VvqICFqJd/7uX+ydXyEQOJ3sYQbHbZhP0=";
|
|
|
|
buildInputs = [
|
|
fontconfig
|
|
openssl
|
|
wayland
|
|
wayland-protocols
|
|
libxkbcommon
|
|
libX11
|
|
libXrandr
|
|
libXi
|
|
libXcursor
|
|
];
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
makeWrapper
|
|
];
|
|
|
|
RUSTC_BOOTSTRAP = 1; # We need rust unstable features
|
|
|
|
postInstall = ''
|
|
install -Dm444 -t "$out/share/applications" "client/assets/net.veloren.airshipper.desktop"
|
|
install -Dm444 "client/assets/net.veloren.airshipper.png" "$out/share/icons/net.veloren.airshipper.png"
|
|
'';
|
|
|
|
postFixup =
|
|
let
|
|
libPath = lib.makeLibraryPath [
|
|
libGL
|
|
vulkan-loader
|
|
wayland
|
|
wayland-protocols
|
|
bzip2
|
|
fontconfig
|
|
freetype
|
|
libxkbcommon
|
|
libX11
|
|
libXrandr
|
|
libXi
|
|
libXcursor
|
|
];
|
|
in
|
|
''
|
|
patchelf --set-rpath "${libPath}" "$out/bin/airshipper"
|
|
wrapProgram "$out/bin/airshipper" --set VELOREN_PATCHER "${patch}"
|
|
'';
|
|
|
|
doCheck = false;
|
|
cargoBuildFlags = [
|
|
"--package"
|
|
"airshipper"
|
|
];
|
|
cargoTestFlags = [
|
|
"--package"
|
|
"airshipper"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Provides automatic updates for the voxel RPG Veloren";
|
|
mainProgram = "airshipper";
|
|
homepage = "https://www.veloren.net";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ yusdacra ];
|
|
};
|
|
}
|