nixpkgs/pkgs/applications/graphics/rx/default.nix
Daniël de Kok 85f96822a0 treewide: fix cargoSha256/cargoHash
Rust 1.50.0 incorporated a Cargo change (rust-lang/cargo#8937) in
which cargo vendor erroneously changed permissions of vendored
crates. This was fixed in Rust
1.51.0 (rust-lang/cargo#9131). Unfortunately, this means that all
cargoSha256/cargoHashes produced during the Rust 1.50.0 cycle are
potentially broken.

This change updates cargoSha256/cargoHash tree-wide.

Fixes #121994.
2021-05-08 00:36:37 -07:00

46 lines
1.2 KiB
Nix

{ lib, stdenv, rustPlatform, fetchFromGitHub, makeWrapper
, cmake, pkg-config
, xorg ? null
, libGL ? null }:
with lib;
rustPlatform.buildRustPackage rec {
pname = "rx";
version = "0.4.0";
src = fetchFromGitHub {
owner = "cloudhead";
repo = pname;
rev = "v${version}";
sha256 = "1pln65pqy39ijrld11d06klwzfhhzmrgdaxijpx9q7w9z66zmqb8";
};
cargoSha256 = "1mb9wx5h729pc9y1b0d0yiapyk0mlbvdmvwq993fcpkziwjvnl44";
nativeBuildInputs = [ cmake pkg-config makeWrapper ];
buildInputs = optionals stdenv.isLinux
(with xorg; [
# glfw-sys dependencies:
libX11 libXrandr libXinerama libXcursor libXi libXext
]);
# FIXME: GLFW (X11) requires DISPLAY env variable for all tests
doCheck = false;
postInstall = optional stdenv.isLinux ''
mkdir -p $out/share/applications
cp $src/rx.desktop $out/share/applications
wrapProgram $out/bin/rx --prefix LD_LIBRARY_PATH : ${libGL}/lib
'';
meta = {
description = "Modern and extensible pixel editor implemented in Rust";
homepage = "https://rx.cloudhead.io/";
license = licenses.gpl3;
maintainers = with maintainers; [ minijackson Br1ght0ne ];
platforms = [ "x86_64-linux" ];
};
}