diff options
author | Someone <sergei.kozlukov@aalto.fi> | 2024-02-18 02:27:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-18 02:27:19 +0000 |
commit | aa5da33c1d8a8742ce193869fcfa7e95304434d8 (patch) | |
tree | 28c5e829afe28de997d63564cd731e8fe8830f1c /pkgs/by-name/re | |
parent | fd4c968e1ef071d6c8faa35df5cda0156d5cb3b3 (diff) | |
parent | 6ffd74b5365403c7cc1b2f670f89ba52d7303baf (diff) | |
download | nixlib-aa5da33c1d8a8742ce193869fcfa7e95304434d8.tar nixlib-aa5da33c1d8a8742ce193869fcfa7e95304434d8.tar.gz nixlib-aa5da33c1d8a8742ce193869fcfa7e95304434d8.tar.bz2 nixlib-aa5da33c1d8a8742ce193869fcfa7e95304434d8.tar.lz nixlib-aa5da33c1d8a8742ce193869fcfa7e95304434d8.tar.xz nixlib-aa5da33c1d8a8742ce193869fcfa7e95304434d8.tar.zst nixlib-aa5da33c1d8a8742ce193869fcfa7e95304434d8.zip |
Merge pull request #289150 from SomeoneSerge/new-package/rerun
rerun: init at 0.13.0
Diffstat (limited to 'pkgs/by-name/re')
-rw-r--r-- | pkgs/by-name/re/rerun/0001-re_space_view_time_series-utils-patch-out-doctests-w.patch | 31 | ||||
-rw-r--r-- | pkgs/by-name/re/rerun/package.nix | 128 |
2 files changed, 159 insertions, 0 deletions
diff --git a/pkgs/by-name/re/rerun/0001-re_space_view_time_series-utils-patch-out-doctests-w.patch b/pkgs/by-name/re/rerun/0001-re_space_view_time_series-utils-patch-out-doctests-w.patch new file mode 100644 index 000000000000..d43ae339641e --- /dev/null +++ b/pkgs/by-name/re/rerun/0001-re_space_view_time_series-utils-patch-out-doctests-w.patch @@ -0,0 +1,31 @@ +From f6c5dde13a39bd149d892162e2ef72267f4c4a57 Mon Sep 17 00:00:00 2001 +From: Someone Serge <sergei.kozlukov@aalto.fi> +Date: Thu, 15 Feb 2024 18:05:16 +0000 +Subject: [PATCH] re_space_view_time_series: utils: patch out doctests w + unstable features + +--- + crates/re_space_view_time_series/src/util.rs | 7 +------ + 1 file changed, 1 insertion(+), 6 deletions(-) + +diff --git a/crates/re_space_view_time_series/src/util.rs b/crates/re_space_view_time_series/src/util.rs +index 83ce5362f..59d3b9734 100644 +--- a/crates/re_space_view_time_series/src/util.rs ++++ b/crates/re_space_view_time_series/src/util.rs +@@ -288,12 +288,7 @@ fn add_series_runs( + /// is finite `x == x.next_up().next_down()` also holds. + /// + /// ```rust +-/// #![feature(float_next_up_down)] +-/// // f64::EPSILON is the difference between 1.0 and the next number up. +-/// assert_eq!(1.0f64.next_up(), 1.0 + f64::EPSILON); +-/// // But not for most numbers. +-/// assert!(0.1f64.next_up() < 0.1 + f64::EPSILON); +-/// assert_eq!(9007199254740992f64.next_up(), 9007199254740994.0); ++/// // PATCHED OUT THE UNSTABLE float_next_up_down + /// ``` + /// + /// [`NEG_INFINITY`]: f64::NEG_INFINITY +-- +2.43.0 + diff --git a/pkgs/by-name/re/rerun/package.nix b/pkgs/by-name/re/rerun/package.nix new file mode 100644 index 000000000000..c2f3842a298c --- /dev/null +++ b/pkgs/by-name/re/rerun/package.nix @@ -0,0 +1,128 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, + pkg-config, + stdenv, + binaryen, + rustfmt, + lld, + darwin, + freetype, + glib, + gtk3, + libxkbcommon, + openssl, + protobuf, + vulkan-loader, + wayland, + python3Packages, +}: + +rustPlatform.buildRustPackage rec { + pname = "rerun"; + version = "0.13.0"; + + src = fetchFromGitHub { + owner = "rerun-io"; + repo = "rerun"; + rev = version; + hash = "sha256-HgzzuvCpzKgWC8it0PSq62hBjjqpdgYtQQ50SNbr3do="; + }; + patches = [ + # Disables a doctest that depends on a nightly feature + ./0001-re_space_view_time_series-utils-patch-out-doctests-w.patch + ]; + + cargoHash = "sha256-qvnkOlcjADV4b+JfFAy9yNaZGaf0ZO7hh9HBg5XmPi0="; + + nativeBuildInputs = [ + (lib.getBin binaryen) # wasm-opt + + # @SomeoneSerge: Upstream suggests `mold`, but I didn't get it to work + lld + + pkg-config + protobuf + rustfmt + ]; + + buildInputs = + [ + freetype + glib + gtk3 + (lib.getDev openssl) + libxkbcommon + vulkan-loader + ] + ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.AppKit + darwin.apple_sdk.frameworks.CoreFoundation + darwin.apple_sdk.frameworks.CoreGraphics + darwin.apple_sdk.frameworks.CoreServices + darwin.apple_sdk.frameworks.Foundation + darwin.apple_sdk.frameworks.IOKit + darwin.apple_sdk.frameworks.Metal + darwin.apple_sdk.frameworks.QuartzCore + darwin.apple_sdk.frameworks.Security + ] + ++ lib.optionals stdenv.isLinux [ (lib.getLib wayland) ]; + + env.CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER = "lld"; + + addBuildInputRunpathsPhase = '' + declare _extraRunpaths + _sep= + for p in "''${pkgsHostTarget[@]}" ; do + if [[ -d "$p/lib" ]] ; then + _extraRunpaths+="$_sep$p/lib" + if [[ -z "$_sep" ]] ; then + _sep=: + fi + fi + done + + elfHasDynamicSection() { + patchelf --print-rpath "$1" >& /dev/null + } + + while IFS= read -r -d $'\0' path ; do + if elfHasDynamicSection "$path" ; then + patchelf "$path" --add-rpath "''${_extraRunpaths}" + fi + done < <( + for o in $(getAllOutputNames) ; do + find "''${!o}" -type f -and "(" -executable -or -iname '*.so' ")" -print0 + done + ) + + unset _extraRunpaths + unset _sep + ''; + + postPhases = lib.optionals stdenv.isLinux [ "addBuildInputRunpathsPhase" ]; + + cargoTestFlags = [ + "-p" + "rerun" + "--workspace" + "--exclude=crates/rerun/src/lib.rs" + ]; + + passthru.tests = { + inherit (python3Packages) rerun-sdk; + }; + + meta = with lib; { + description = "Visualize streams of multimodal data. Fast, easy to use, and simple to integrate. Built in Rust using egui"; + homepage = "https://github.com/rerun-io/rerun"; + changelog = "https://github.com/rerun-io/rerun/blob/${src.rev}/CHANGELOG.md"; + license = with licenses; [ + asl20 + mit + ]; + maintainers = with maintainers; [ SomeoneSerge ]; + mainProgram = "rerun"; + }; +} |