foxglove-studio: init at 2.37.0 (#417985)

This commit is contained in:
misuzu
2025-10-10 13:31:50 +00:00
committed by GitHub
2 changed files with 111 additions and 0 deletions

View File

@@ -0,0 +1,94 @@
{
stdenv,
lib,
fetchurl,
dpkg,
autoPatchelfHook,
makeDesktopItem,
makeWrapper,
copyDesktopItems,
alsa-lib,
at-spi2-core,
gtk3,
libGL,
libappindicator,
libdrm,
libgbm,
libnotify,
libxcb,
nss,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "foxglove-studio";
version = "2.37.0";
src = fetchurl {
url = "https://get.foxglove.dev/desktop/v${finalAttrs.version}/foxglove-studio-${finalAttrs.version}-linux-amd64.deb";
hash = "sha256-XY+RclsP8uQS5aKe1FopdItAjbQ9uWQ8uVD9pb9n42U=";
};
nativeBuildInputs = [
autoPatchelfHook
copyDesktopItems
dpkg
makeWrapper
];
buildInputs = [
alsa-lib
at-spi2-core
gtk3
libGL
libappindicator
libdrm
libgbm
libnotify
libxcb
nss
];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,opt,share}
cp -r opt/Foxglove $out/opt/
cp -r usr/share/icons $out/share/
cp -r usr/share/mime $out/share/
ln -s "$out/opt/Foxglove/foxglove-studio" $out/bin/foxglove-studio
runHook postInstall
'';
preFixup = ''patchelf --add-needed libGL.so.1 --add-needed libEGL.so.1 $out/opt/Foxglove/foxglove-studio'';
passthru.updateScript = ./update.sh;
desktopItems = [
(makeDesktopItem {
name = "foxglove-studio";
desktopName = "Foxglove Studio";
comment = "Integrated robotics visualization and debugging";
exec = "foxglove-studio %U";
icon = "foxglove-studio";
categories = [ "Development" ];
mimeTypes = [
"application/octet-stream"
"application/zip"
"x-scheme-handler/foxglove"
];
})
];
meta = {
changelog = "https://docs.foxglove.dev/changelog/foxglove/v${finalAttrs.version}";
description = "Visualization and observability platform for robotics";
downloadPage = "https://foxglove.dev/download";
homepage = "https://foxglove.dev/";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [ sascha8a ];
platforms = [ "x86_64-linux" ];
hydraPlatforms = [ ];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts
set -eu -o pipefail
changelog_url="https://docs.foxglove.dev/changelog/tags/foxglove"
# Extract the latest version from the changelog page
version=$(
curl -s "$changelog_url" \
| grep 'Downloads: ' \
| grep '<a href="https://get.foxglove.dev/desktop/v' \
| grep -oP '[0-9]+\.[0-9]+\.[0-9]+' \
| head -1
)
update-source-version foxglove-studio "$version"