Unverified Commit d07d2f98 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

surfer: init at v0.2.0 (#324637)

parents 62f0186c be9a3166
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -8083,6 +8083,12 @@
    githubId = 1162118;
    name = "Harald Gliebe";
  };
  hakan-demirli = {
    email = "ehdemirli@proton.me";
    github = "hakan-demirli";
    githubId = 78746991;
    name = "Emre Hakan Demirli";
  };
  hakuch = {
    email = "hakuch@gmail.com";
    github = "hakuch";
+6184 −0

File added.

Preview size limit exceeded, changes collapsed.

+77 −0
Original line number Diff line number Diff line
{
  lib,
  fetchFromGitLab,
  rustPlatform,
  pkg-config,
  openssl,
  wayland,
  autoPatchelfHook,
  libxkbcommon,
  libGL,
  libX11,
  libXcursor,
  libXi,
  stdenv,
  makeWrapper,
  zenity,
}:
rustPlatform.buildRustPackage rec {
  pname = "surfer";
  version = "0.2.0";

  src = fetchFromGitLab {
    owner = "surfer-project";
    repo = "surfer";
    rev = "v${version}";
    hash = "sha256-C5jyWLs7fdEn2oW5BORZYazQwjXNxf8ketYFwlVkHpA";
    fetchSubmodules = true;
  };

  nativeBuildInputs = [
    pkg-config
    autoPatchelfHook
    makeWrapper
  ];

  buildInputs = [
    openssl
    stdenv.cc.cc.lib
  ];

  # Wayland and X11 libs are required at runtime since winit uses dlopen
  runtimeDependencies = [
    wayland
    libxkbcommon
    libGL
    libX11
    libXcursor
    libXi
  ];

  cargoLock = {
    lockFile = ./Cargo.lock;
    outputHashes = {
      "codespan-0.12.0" = "sha256-3F2006BR3hyhxcUTaQiOjzTEuRECKJKjIDyXonS/lrE=";
      "egui_skia-0.5.0" = "sha256-dpkcIMPW+v742Ov18vjycLDwnn1JMsvbX6qdnuKOBC4=";
      "tracing-tree-0.2.0" = "sha256-/JNeAKjAXmKPh0et8958yS7joORDbid9dhFB0VUAhZc=";
    };
  };

  # Avoid the network attempt from skia. See: https://github.com/cargo2nix/cargo2nix/issues/318
  doCheck = false;

  postFixup = ''
    wrapProgram $out/bin/surfer \
      --prefix PATH : ${lib.makeBinPath [ zenity ]}
  '';

  meta = {
    description = "Extensible and Snappy Waveform Viewer";
    homepage = "https://surfer-project.org/";
    changelog = "https://gitlab.com/surfer-project/surfer/-/releases/v${version}";
    license = lib.licenses.eupl12;
    maintainers = with lib.maintainers; [ hakan-demirli ];
    platforms = lib.platforms.linux;
    mainProgram = "surfer";
  };
}