about summary refs log tree commit diff
path: root/nixpkgs/pkgs/games/quakespasm
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/games/quakespasm
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/games/quakespasm')
-rw-r--r--nixpkgs/pkgs/games/quakespasm/default.nix42
-rw-r--r--nixpkgs/pkgs/games/quakespasm/vulkan.nix54
2 files changed, 96 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/games/quakespasm/default.nix b/nixpkgs/pkgs/games/quakespasm/default.nix
new file mode 100644
index 000000000000..f61b0e237925
--- /dev/null
+++ b/nixpkgs/pkgs/games/quakespasm/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, SDL, fetchurl, gzip, libvorbis, libmad }:
+stdenv.mkDerivation rec {
+  name = "quakespasm-${version}";
+  majorVersion = "0.93";
+  version = "${majorVersion}.1";
+
+  src = fetchurl {
+    url = "mirror://sourceforge/quakespasm/quakespasm-${version}.tgz";
+    sha256 = "1bimv18f6rzhyjz78yvw2vqr5n0kdqbcqmq7cb3m951xgsxfcgpd";
+  };
+
+  sourceRoot = "${name}/Quake";
+
+  buildInputs = [
+    gzip SDL libvorbis libmad
+  ];
+
+  buildFlags = [ "DO_USERDIRS=1" ];
+
+  preInstall = ''
+    mkdir -p "$out/bin"
+    substituteInPlace Makefile --replace "/usr/local/games" "$out/bin"
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "An engine for iD software's Quake";
+    homepage = http://quakespasm.sourceforge.net/;
+    longDescription = ''
+      QuakeSpasm is a modern, cross-platform Quake 1 engine based on FitzQuake.
+      It includes support for 64 bit CPUs and custom music playback, a new sound driver,
+      some graphical niceities, and numerous bug-fixes and other improvements.
+      Quakespasm utilizes either the SDL or SDL2 frameworks, so choose which one
+      works best for you. SDL is probably less buggy, but SDL2 has nicer features
+      and smoother mouse input - though no CD support.
+    '';
+
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.m3tti ];
+  };
+}
diff --git a/nixpkgs/pkgs/games/quakespasm/vulkan.nix b/nixpkgs/pkgs/games/quakespasm/vulkan.nix
new file mode 100644
index 000000000000..6f69c6469503
--- /dev/null
+++ b/nixpkgs/pkgs/games/quakespasm/vulkan.nix
@@ -0,0 +1,54 @@
+{ stdenv, SDL2, fetchFromGitHub, makeWrapper, gzip, libvorbis, libmad, vulkan-headers, vulkan-loader }:
+
+stdenv.mkDerivation rec {
+  name = "vkquake-${version}";
+  majorVersion = "1.00";
+  version = "${majorVersion}.0";
+
+  src = fetchFromGitHub {
+    owner = "Novum";
+    repo = "vkQuake";
+    rev = version;
+    sha256 = "1h7ac5bh6h6cpvkx5bvp17lv5m24hmdykcdppkivblikpxhml70s";
+  };
+
+  sourceRoot = "source/Quake";
+
+  nativeBuildInputs = [
+    makeWrapper vulkan-headers
+  ];
+
+  buildInputs = [
+    gzip SDL2 libvorbis libmad vulkan-loader
+  ];
+
+  buildFlags = [ "DO_USERDIRS=1" ];
+
+  preInstall = ''
+    mkdir -p "$out/bin"
+  '';
+
+  makeFlags = [ "prefix=$(out) bindir=$(out)/bin" ];
+
+  postFixup = ''
+    wrapProgram $out/bin/vkquake --prefix LD_LIBRARY_PATH : ${vulkan-loader}/lib
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Vulkan Quake port based on QuakeSpasm";
+    homepage = src.meta.homepage;
+    longDescription = ''
+      vkQuake is a Quake 1 port using Vulkan instead of OpenGL for rendering.
+      It is based on the popular QuakeSpasm port and runs all mods compatible with it
+      like Arcane Dimensions or In The Shadows. vkQuake also serves as a Vulkan demo
+      application that shows basic usage of the API. For example it demonstrates render
+      passes & sub passes, pipeline barriers & synchronization, compute shaders, push &
+      specialization constants, CPU/GPU parallelism and memory pooling.
+    '';
+
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.gnidorah ];
+  };
+}