1 { lib, stdenv, rustPlatform, fetchFromGitHub, makeWrapper
6 rustPlatform.buildRustPackage rec {
10 src = fetchFromGitHub {
14 sha256 = "sha256-LTpaV/fgYUgA2M6Wz5qLHnTNywh13900g+umhgLvciM=";
17 cargoHash = "sha256-4hi1U4jl6QA7H8AKHlU+Hqz5iKGYHRXHDsrcqY7imkU=";
19 nativeBuildInputs = [ cmake pkg-config makeWrapper ];
21 buildInputs = lib.optionals stdenv.hostPlatform.isLinux
23 # glfw-sys dependencies:
24 libX11 libXrandr libXinerama libXcursor libXi libXext
27 # FIXME: GLFW (X11) requires DISPLAY env variable for all tests
30 postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
31 mkdir -p $out/share/applications
32 cp $src/rx.desktop $out/share/applications
33 wrapProgram $out/bin/rx --prefix LD_LIBRARY_PATH : ${libGL}/lib
37 description = "Modern and extensible pixel editor implemented in Rust";
39 homepage = "https://rx.cloudhead.io/";
40 license = licenses.gpl3;
41 maintainers = with maintainers; [ minijackson Br1ght0ne ];
42 platforms = [ "x86_64-linux" ];