eb11feaa0b
Changes the default fetcher in the Rust Platform to be the newer `fetchCargoTarball`, and changes every application using the current default to instead opt out. This commit does not change any hashes or cause any rebuilds. Once integrated, we will start deleting the opt-outs and recomputing hashes. See #79975 for details.
48 lines
1.3 KiB
Nix
48 lines
1.3 KiB
Nix
{ stdenv, rustPlatform, fetchFromGitHub, makeWrapper
|
|
, cmake, pkgconfig
|
|
, xorg ? null
|
|
, libGL ? null }:
|
|
|
|
with stdenv.lib;
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "rx";
|
|
version = "0.3.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "cloudhead";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "1n5s7v2z13550gkqz7w6dw62jdy60wdi8w1lfa23609b4yhg4w94";
|
|
};
|
|
|
|
# Delete this on next update; see #79975 for details
|
|
legacyCargoFetcher = true;
|
|
|
|
cargoSha256 = "173jfjvdag97f6jvfg366hjk9v3cz301cbzpcahy51rbf1cip1w1";
|
|
|
|
nativeBuildInputs = [ cmake pkgconfig 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://cloudhead.io/rx/";
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ minijackson filalex77 ];
|
|
platforms = [ "x86_64-linux" ];
|
|
};
|
|
}
|