2018-04-17 15:06:41 +00:00
|
|
|
{ stdenv, lib, makeWrapper, fetchurl,
|
2019-05-22 11:03:39 +00:00
|
|
|
alsaLib, atk, cairo, cups, dbus, expat, fontconfig, freetype, gdk-pixbuf, glib,
|
2020-10-25 19:38:25 +00:00
|
|
|
gnome2, pango, gtk2-x11, nspr, nss,
|
2018-04-17 15:06:41 +00:00
|
|
|
libX11, libxcb, libXcomposite, libXcursor, libXdamage, libXext, libXfixes,
|
|
|
|
libXi, libXrandr, libXrender, libXScrnSaver, libXtst,
|
|
|
|
libudev0-shim
|
|
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "sweep-visualizer";
|
2018-04-17 15:06:41 +00:00
|
|
|
version = "0.15.0";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://s3.amazonaws.com/scanse/Visualizer/v${version}/sweepvisualizer_${version}_amd64.deb";
|
|
|
|
sha256 = "1k6rdjw2340qrzafv6hjxvbvyh3s1wad6d3629nchdcrpyx9xy1c";
|
|
|
|
};
|
2019-05-22 11:03:39 +00:00
|
|
|
|
2018-04-17 15:06:41 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
unpackCmd = ''
|
|
|
|
ar p "$src" data.tar.xz | tar xJ
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ":";
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-04-22 03:23:19 +00:00
|
|
|
mkdir -p $out/bin $out/share/sweep-visualizer
|
2018-04-17 15:06:41 +00:00
|
|
|
mv usr/share/* $out/share
|
|
|
|
mv opt/Sweep\ Visualizer\ BETA/* $out/share/sweep-visualizer/
|
|
|
|
ln -s $out/share/sweep-visualizer/sweep_visualizer $out/bin/sweep_visualizer
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = let
|
|
|
|
libPath = lib.makeLibraryPath [
|
2019-05-22 11:03:39 +00:00
|
|
|
alsaLib atk cairo cups.lib dbus.lib expat fontconfig.lib freetype
|
2020-10-25 19:38:25 +00:00
|
|
|
gdk-pixbuf glib gnome2.GConf pango gtk2-x11 nspr nss stdenv.cc.cc.lib
|
2018-04-17 15:06:41 +00:00
|
|
|
libX11 libxcb libXcomposite libXcursor libXdamage libXext libXfixes
|
|
|
|
libXi libXrandr libXrender libXScrnSaver libXtst
|
|
|
|
];
|
|
|
|
runtimeLibs = lib.makeLibraryPath [ libudev0-shim ];
|
|
|
|
in ''
|
2018-04-22 03:23:19 +00:00
|
|
|
for lib in $out/share/sweep-visualizer/*.so; do
|
|
|
|
patchelf --set-rpath "$out/share/sweep-visualizer:${libPath}" $lib
|
2018-04-17 15:06:41 +00:00
|
|
|
done
|
|
|
|
patchelf \
|
|
|
|
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
2018-04-22 03:23:19 +00:00
|
|
|
--set-rpath "$out/share/sweep-visualizer:${libPath}" \
|
2018-04-17 15:06:41 +00:00
|
|
|
$out/share/sweep-visualizer/sweep_visualizer
|
|
|
|
wrapProgram "$out/bin/sweep_visualizer" --prefix LD_LIBRARY_PATH : ${runtimeLibs}
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://support.scanse.io/hc/en-us/articles/115006008948-Visualizer-Overview";
|
2018-04-17 15:06:41 +00:00
|
|
|
description = "A minimal desktop application for interfacing with the Sweep device";
|
|
|
|
license = licenses.unfree;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ mt-caret ];
|
|
|
|
};
|
|
|
|
}
|