rx: 0.2.0 -> 0.3.0

- Remove "--features" invocations
- Refactor some meta attributes
This commit is contained in:
Oleksii Filonenko 2019-12-30 17:21:00 +02:00
parent c94e211a47
commit 98224979fb
No known key found for this signature in database
GPG Key ID: F3510FE5691629A1

View File

@ -3,25 +3,20 @@
, xorg ? null
, vulkan-loader ? null }:
assert stdenv.isLinux -> xorg != null;
assert stdenv.isLinux -> vulkan-loader != null;
let
graphicsBackend = if stdenv.isDarwin then "metal" else "vulkan";
in
with stdenv.lib;
rustPlatform.buildRustPackage rec {
pname = "rx";
version = "0.2.0";
version = "0.3.0";
src = fetchFromGitHub {
owner = "cloudhead";
repo = pname;
rev = "v${version}";
sha256 = "0f6cw8zqr45bprj8ibhp89bb2a077g4zinfrdn943csdmh47qzcl";
sha256 = "0mhpq9x54d884ydmfv1358sgc4jc7bghfx2y0k7p879hyyxr52v1";
};
cargoSha256 = "05bqsw0nw24xysq86qa3hx9b5ncf50wfxsgpy388yrs2dfnphwlx";
cargoSha256 = "0fnrgijfkvapj1yyy9grnqh2vkciisf029af0gfwyzsxzdi62gg5";
nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
@ -31,15 +26,8 @@ in
libX11 libXrandr libXinerama libXcursor libXi libXext
]);
cargoBuildFlags = [ "--features=${graphicsBackend}" ];
# TODO: better to factor that into the rust platform
checkPhase = ''
runHook preCheck
echo "Running cargo test"
cargo test --features=${graphicsBackend}
runHook postCheck
'';
# FIXME: GLFW (X11) requires DISPLAY env variable for all tests
doCheck = false;
postInstall = optional stdenv.isLinux ''
mkdir -p $out/share/applications
@ -52,7 +40,6 @@ in
homepage = "https://cloudhead.io/rx/";
license = licenses.gpl3;
maintainers = with maintainers; [ minijackson ];
platforms = with platforms; (linux ++ darwin ++ windows);
inherit version;
platforms = platforms.all;
};
}