mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 01:43:15 +00:00
78 lines
1.7 KiB
Nix
78 lines
1.7 KiB
Nix
{
|
|
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";
|
|
};
|
|
}
|