piscope: init at 0.8

This commit is contained in:
Doron Behar 2023-04-20 12:14:52 +03:00
parent 5899b0d12f
commit 3397b0a70c

View file

@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchFromGitHub,
# nativeBuildInputs
pkg-config,
wrapGAppsHook3,
installShellFiles,
# buildInputs
gtk3,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "piscope";
version = "0.8";
src = fetchFromGitHub {
owner = "joan2937";
repo = "piscope";
tag = "V${finalAttrs.version}";
hash = "sha256-VDrx/RLSpMhyD64PmdeWVacb9LleHakcy7D6zFxeyhw=";
};
# Fix FHS paths
postConfigure = ''
substituteInPlace piscope.c \
--replace /usr/share/piscope $out/share/piscope
'';
nativeBuildInputs = [
pkg-config
wrapGAppsHook3
installShellFiles
];
buildInputs = [
gtk3
];
# Upstream's Makefile assumes FHS
installPhase = ''
runHook preInstall
installBin piscope
install -D -m 0644 piscope.glade $out/share/piscope/piscope.glade
runHook postInstall
'';
meta = {
homepage = "http://abyz.me.uk/rpi/pigpio/piscope.html";
description = "A logic analyser (digital waveform viewer) for the Raspberry";
license = lib.licenses.unlicense;
maintainers = with lib.maintainers; [ doronbehar ];
platforms = lib.platforms.linux;
};
})