Merge pull request #329823 from ExpidusOS/fix/pkgsllvm/elfutils
[NixPkgs.git] / pkgs / by-name / hy / hyperspeedcube / package.nix
blob79616e0a6762874312716d2473f8e788ecffef56
1 { cmake
2 , alsa-lib
3 , atk
4 , cairo
5 , directx-shader-compiler
6 , expat
7 , fetchFromGitHub
8 , fontconfig
9 , freetype
10 , gdk-pixbuf
11 , glib
12 , gtk3
13 , harfbuzz
14 , lib
15 , libGL
16 , libX11
17 , libxcb
18 , libXcursor
19 , libXi
20 , libxkbcommon
21 , libXrandr
22 , makeWrapper
23 , mold
24 , pango
25 , pkg-config
26 , python3
27 , rustPlatform
28 , shaderc
29 , vulkan-extension-layer
30 , vulkan-headers
31 , vulkan-loader
32 , vulkan-tools
33 , vulkan-tools-lunarg
34 , vulkan-validation-layers
35 , wayland
36 , wrapGAppsHook3
37 , yq
38 , zlib
41 rustPlatform.buildRustPackage rec {
42   pname = "hyperspeedcube";
43   version = "1.0.7";
45   src = fetchFromGitHub {
46     owner = "HactarCE";
47     repo = "Hyperspeedcube";
48     rev = "v${version}";
49     hash = "sha256-ykFf0dfc8j88Y25tx+G9lic09eHDz3WR+h6+owTeWbU=";
50   };
52   cargoLock = {
53     lockFile = ./Cargo.lock;
54     outputHashes = {
55      "key-names-1.5.1" = "sha256-ZO3mlCoUHCaMnxD2vQno6GNx0+JmwZ8OiqpyveiVfvc=";
56     };
57   };
59   nativeBuildInputs = [
60     cmake
61     pkg-config
62     (lib.getDev libxcb)
63     python3
64     makeWrapper
65     wrapGAppsHook3
66   ];
68   buildInputs = [
69     alsa-lib
70     atk
71     cairo
72     directx-shader-compiler
73     expat
74     fontconfig
75     freetype
76     gdk-pixbuf
77     glib
78     gtk3
79     harfbuzz
80     mold
81     pango
82     shaderc
83     zlib
85     # for execution errors (see https://github.com/emilk/egui/discussions/1587)
86     libxkbcommon
87     libGL
89     # WINIT_UNIX_BACKEND=wayland
90     wayland
92     # WINIT_UNIX_BACKEND=x11
93     libXcursor
94     libXrandr
95     libXi
96     libX11
98     vulkan-headers
99     vulkan-loader
100     vulkan-tools
101     vulkan-tools-lunarg
102     vulkan-extension-layer
103     vulkan-validation-layers
105     yq
106   ];
108   postInstall = ''
109     patchelf \
110       --add-needed ${vulkan-loader}/lib/libvulkan.so.1 \
111       --add-needed ${libGL}/lib/libEGL.so.1 \
112       $out/bin/hyperspeedcube
113     wrapProgram $out/bin/hyperspeedcube --set WAYLAND_DISPLAY "" --set XDG_SESSION_TYPE ""
114     touch $out/bin/nonportable
115   '';
117   meta = {
118     description = "Hyperspeedcube is a 3D and 4D Rubik's cube simulator";
119     longDescription = ''
120       Hyperspeedcube is a modern, beginner-friendly 3D and 4D Rubik's cube
121       simulator with customizable mouse and keyboard controls and advanced
122       features for speedsolving. It's been used to break numerous speedsolving
123       records and runs on all major operating systems plus the web.
124     '';
125     homepage = "https://ajfarkas.dev/hyperspeedcube/";
126     license = lib.licenses.cc-by-nc-sa-40;
127     maintainers = [ lib.maintainers.omnipotententity ];
128     platforms = [ "x86_64-linux" ];
129   };