about summary refs log tree commit diff
path: root/pkgs/games/gl-gsync-demo
diff options
context:
space:
mode:
authorAtemu <atemu.main@gmail.com>2020-12-27 16:23:01 +0100
committerAtemu <atemu.main@gmail.com>2021-10-12 20:57:00 +0200
commit2f49e7148b212d8b7085f3915ecad2b76518ee0c (patch)
tree73ca3f2f893d8c26e233bf5c6f34717d1760aabc /pkgs/games/gl-gsync-demo
parent21c937f8cb1e6adcfeb36dfd6c90d9d9bfab1d28 (diff)
gl-gsync-demo: init at 2020-12-27
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/games/gl-gsync-demo')
-rw-r--r--pkgs/games/gl-gsync-demo/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/games/gl-gsync-demo/default.nix b/pkgs/games/gl-gsync-demo/default.nix
new file mode 100644
index 0000000000000..a4b30c572a00d
--- /dev/null
+++ b/pkgs/games/gl-gsync-demo/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, fetchFromGitHub, libX11, freeglut, glew, libXNVCtrl, libXext, lib }:
+
+stdenv.mkDerivation rec {
+  pname = "gl-gsync-demo";
+  version = "unstable-2020-12-27";
+
+  src = fetchFromGitHub {
+    owner = "dahenry";
+    repo = "gl-gsync-demo";
+    rev = "4fd963a8ad880dc2d846394c8c80b2091a119591";
+    sha256 = "1innsmpsd9n9ih80v16rhj2ijrl28jd7x6a4jmxdirba7mjibm8d";
+  };
+
+  buildInputs = [ libX11 freeglut glew libXNVCtrl libXext ];
+
+  installPhase = ''
+    runHook preInstall
+
+    install -D gl-gsync-demo -t $out/bin/
+
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    license = with licenses; mit;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ atemu ];
+    description = "A very basic OpenGL demo for testing NVIDIA's G-SYNC technology on Linux";
+    longDescription = ''
+      The demo simply draws a vertical bar moving accross the screen at constant speed, but deliberately rendered at a variable frame rate.
+
+      The min and max frame rates can be manually changed at runtime, by step of 10 fps and with a min of 10 fps.
+
+      The demo also allows to toggle V-Sync on/off.
+    '';
+    homepage = "https://github.com/dahenry/gl-gsync-demo";
+  };
+}