nixpkgs/pkgs/games/airshipper/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.6 KiB
Nix
Raw Normal View History

2021-09-11 17:21:05 +00:00
{ lib
, rustPlatform
, fetchFromGitLab
, openssl
, vulkan-loader
, wayland
, wayland-protocols
, libxkbcommon
, libX11
, libXrandr
, libXi
, libXcursor
, pkg-config
, makeWrapper
}:
rustPlatform.buildRustPackage rec {
pname = "airshipper";
2022-03-13 01:10:15 +00:00
version = "0.7.0";
2021-09-11 17:21:05 +00:00
src = fetchFromGitLab {
owner = "Veloren";
repo = "airshipper";
rev = "v${version}";
2022-03-13 01:10:15 +00:00
sha256 = "sha256-nOE9ZNHxLEAnMkuBSpxmeq3DxkRIlcoase6AxU+eFug=";
2021-09-11 17:21:05 +00:00
};
2022-03-13 01:10:15 +00:00
cargoSha256 = "sha256-s3seKVEhXyOVlt3a8cubzRWoB4SVQpdCmq12y0FpDUw=";
2021-09-11 17:21:05 +00:00
buildInputs = [
openssl
wayland
wayland-protocols
libxkbcommon
libX11
libXrandr
libXi
libXcursor
];
nativeBuildInputs = [ pkg-config makeWrapper ];
postInstall = ''
mkdir -p "$out/share/applications" && mkdir -p "$out/share/icons"
cp "client/assets/net.veloren.airshipper.desktop" "$out/share/applications"
cp "client/assets/logo.ico" "$out/share/icons/net.veloren.airshipper.ico"
'';
postFixup =
let
libPath = lib.makeLibraryPath [
vulkan-loader
wayland
wayland-protocols
libxkbcommon
libX11
libXrandr
libXi
libXcursor
];
in ''
patchelf --set-rpath "${libPath}" "$out/bin/airshipper"
'';
doCheck = false;
cargoBuildFlags = [ "--package" "airshipper" ];
cargoTestFlags = [ "--package" "airshipper" ];
meta = with lib; {
description = "Provides automatic updates for the voxel RPG Veloren.";
homepage = "https://www.veloren.net";
license = licenses.gpl3;
maintainers = with maintainers; [ yusdacra ];
};
}