1{
2 stdenv,
3 fetchFromGitHub,
4 libX11,
5 libglut,
6 glew,
7 libXNVCtrl,
8 libXext,
9 lib,
10}:
11
12stdenv.mkDerivation {
13 pname = "gl-gsync-demo";
14 version = "unstable-2020-12-27";
15
16 src = fetchFromGitHub {
17 owner = "dahenry";
18 repo = "gl-gsync-demo";
19 rev = "4fd963a8ad880dc2d846394c8c80b2091a119591";
20 sha256 = "1innsmpsd9n9ih80v16rhj2ijrl28jd7x6a4jmxdirba7mjibm8d";
21 };
22
23 buildInputs = [
24 libX11
25 libglut
26 glew
27 libXNVCtrl
28 libXext
29 ];
30
31 installPhase = ''
32 runHook preInstall
33
34 install -D gl-gsync-demo -t $out/bin/
35
36 runHook postInstall
37 '';
38
39 meta = with lib; {
40 license = with licenses; mit;
41 platforms = platforms.linux;
42 maintainers = with maintainers; [ atemu ];
43 description = "Very basic OpenGL demo for testing NVIDIA's G-SYNC technology on Linux";
44 mainProgram = "gl-gsync-demo";
45 longDescription = ''
46 The demo simply draws a vertical bar moving across the screen at constant speed, but deliberately rendered at a variable frame rate.
47
48 The min and max frame rates can be manually changed at runtime, by step of 10 fps and with a min of 10 fps.
49
50 The demo also allows to toggle V-Sync on/off.
51 '';
52 homepage = "https://github.com/dahenry/gl-gsync-demo";
53 };
54}