about summary refs log tree commit diff
path: root/pkgs/games/airshipper
diff options
context:
space:
mode:
authorYusuf Bera Ertan <y.bera003.06@protonmail.com>2021-09-11 20:21:05 +0300
committerYusuf Bera Ertan <y.bera003.06@protonmail.com>2021-09-11 20:21:05 +0300
commit3935d8a9d2497424d72d4c774c4851d5c5e19fdc (patch)
treeab0f43a7bfaf6661b442f6505696956a48c0cbd7 /pkgs/games/airshipper
parent0e24c87754430cb6ad2f8c8c8021b29834a8845e (diff)
airshipper: init at 0.6.0
Diffstat (limited to 'pkgs/games/airshipper')
-rw-r--r--pkgs/games/airshipper/default.nix74
1 files changed, 74 insertions, 0 deletions
diff --git a/pkgs/games/airshipper/default.nix b/pkgs/games/airshipper/default.nix
new file mode 100644
index 0000000000000..1fe33a86f9780
--- /dev/null
+++ b/pkgs/games/airshipper/default.nix
@@ -0,0 +1,74 @@
+{ lib
+, rustPlatform
+, fetchFromGitLab
+, openssl
+, vulkan-loader
+, wayland
+, wayland-protocols
+, libxkbcommon
+, libX11
+, libXrandr
+, libXi
+, libXcursor
+, pkg-config
+, makeWrapper
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "airshipper";
+  version = "0.6.0";
+
+  src = fetchFromGitLab {
+    owner = "Veloren";
+    repo = "airshipper";
+    rev = "v${version}";
+    sha256 = "sha256-m3H2FE1DoV/uk9PGgf9PCagwmWWSQO/gCi7zpS02/WY=";
+  };
+
+  cargoSha256 = "sha256-ddy4TjT/ia+sLBnpwcXBVUzAS07ar+Jjc04KS5/arlU=";
+
+  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 ];
+  };
+}