nixpkgs/pkgs/by-name/su/surfer/package.nix
Ihar Hrachyshka dd0f03a56c treewide: remove usage of deprecated apple_sdk framework stubs
They are not doing anything right now. This is in preparation for their
complete removal from the tree.

Note: several changes that affect the derivation inputs (e.g. removal of
references to stub paths in build instructions) were left out. They will
be cleaned up the next iteration and will require special care.

Note: this PR is a result of a mix of ugly regex (not AST) based
automation and some manual labor. For reference, the regex automation
part was hacked in: https://github.com/booxter/nix-clean-apple_sdk

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com>
2025-04-19 20:28:20 -04:00

72 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.3.0";
src = fetchFromGitLab {
owner = "surfer-project";
repo = "surfer";
rev = "v${version}";
hash = "sha256-mvHyljAEVi1FMkEbKsPmCNx2Cg0/Ydw3ZQCZsowEKGc=";
fetchSubmodules = true;
};
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [
pkg-config
autoPatchelfHook
makeWrapper
];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
openssl
(lib.getLib stdenv.cc.cc)
];
# Wayland and X11 libs are required at runtime since winit uses dlopen
runtimeDependencies = lib.optionals stdenv.hostPlatform.isLinux [
wayland
libxkbcommon
libGL
libX11
libXcursor
libXi
];
useFetchCargoVendor = true;
cargoHash = "sha256-89pkHS0YQ77PmQfT8epdu2tPRNAenYGgtoiJVuuVYiI=";
# Avoid the network attempt from skia. See: https://github.com/cargo2nix/cargo2nix/issues/318
doCheck = false;
postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
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 ++ lib.platforms.darwin;
mainProgram = "surfer";
};
}