-
-
Notifications
You must be signed in to change notification settings - Fork 14k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
}; | ||
}) |