Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 126 additions & 0 deletions pkgs/rev-hardware-client-2/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
{
lib,
buildFHSEnv,
stdenv,
fetchurl,

alsa-lib,
at-spi2-atk,
at-spi2-core,
atk,
cairo,
cups,
dbus,
expat,
fontconfig,
glib,
gtk3,
libGL,
libdrm,
libgbm,
libgcc,
libx11,
libxcb,
libxcomposite,
libxcursor,
libxdamage,
libxext,
libxfixes,
libxi,
libxkbcommon,
libxrandr,
libxrender,
libxshmfence,
libxtst,
libxxf86vm,
nspr,
nss,
pango,
systemdLibs,
udev,
}:
let
pname = "rev-hardware-client-2";
version = "1.0.7";

rhc2-unwrapped = stdenv.mkDerivation (finalAttrs: {
pname = "${pname}-unwrapped";
inherit version;
src = fetchurl {
url = "https://rhc2.revrobotics.com/download/rev-hardware-client-1.0.7-linux-amd64.tar.gz";
hash = "sha256-dIn32bBVarRVoHSG0cZiIt5W33Q5YuQToaZvN/Q8p7s=";
};

dontBuild = true;

installPhase = ''
runHook preInstall

cp -r . $out/
substituteInPlace $out/share/applications/com.revrobotics.revui.rev-hardware-client.desktop \
--replace-fail Exec=/usr/lib/rev-robotics/rev-hardware-client/bin/rev-hardware-client Exec=rev-hardware-client

runHook postInstall
'';
});
in
buildFHSEnv {
inherit pname version;

targetPkgs = _: [
rhc2-unwrapped

alsa-lib
at-spi2-atk
at-spi2-core
atk
cairo
cups
# cups.lib
dbus
expat
fontconfig
glib
gtk3
libGL
libdrm
libgbm
libgcc
libx11
libxcb
libxcomposite
libxcursor
libxdamage
libxext
libxfixes
libxi
libxkbcommon
libxrandr
libxrender
libxshmfence
libxtst
libxxf86vm
nspr
nss
pango
stdenv.cc.cc
systemdLibs
udev
];

runScript = "rev-hardware-client";

extraInstallCommands = ''
mkdir -p $out/
cp -r ${rhc2-unwrapped}/share $out/share
'';

meta = {
description = "Hardware client for REV devices.";
homepage = "https://docs.revrobotics.com/rev-hardware-client-2";
# license = lib.licenses.unfree;
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was commented out for easier testing

maintainers = with lib.maintainers; [ nullcube ];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
platforms = [ "x86_64-linux" ];
};
}
Loading