Skip to content

Commit

Permalink
iio-oscilloscope: init at 0.17
Browse files Browse the repository at this point in the history
  • Loading branch information
chuangzhu committed Oct 31, 2024
1 parent 4c2fcb0 commit e9b25cf
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions pkgs/by-name/ii/iio-oscilloscope/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
wrapGAppsHook,
libiio,
glib,
gtk3,
gtkdatabox,
matio,
fftw,
libxml2,
curl,
jansson,
enable9361 ? true,
libad9361,
# enable9166 ? true,
# libad9166,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "iio-oscilloscope";
version = "0.17";

src = fetchFromGitHub {
owner = "analogdevicesinc";
repo = finalAttrs.pname;
rev = "v${finalAttrs.version}-master";
hash = "sha256-wCeOLAkrytrBaXzUbNu8z2Ayz44M+b+mbyaRoWHpZYU=";
};

postPatch = ''
# error: 'idx' may be used uninitialized
substituteInPlace plugins/lidar.c --replace "int i, j, idx;" "int i, j, idx = 0;"
'';

nativeBuildInputs = [
cmake
pkg-config
wrapGAppsHook
];

buildInputs = [
libiio
glib
gtk3
gtkdatabox
matio
fftw
libxml2
curl
jansson
] ++ lib.optional enable9361 libad9361;

cmakeFlags = [
"-DCMAKE_POLKIT_PREFIX=${placeholder "out"}"
];

meta = {
description = "GTK+ based oscilloscope application for interfacing with various IIO devices";
homepage = "https://wiki.analog.com/resources/tools-software/linux-software/iio_oscilloscope";
mainProgram = "osc";
license = lib.licenses.gpl2Only;
changelog = "https://github.com/analogdevicesinc/iio-oscilloscope/releases/tag/v${finalAttrs.version}-master";
maintainers = with lib.maintainers; [ chuangzhu ];
platforms = lib.platforms.linux;
};
})

0 comments on commit e9b25cf

Please sign in to comment.