3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/science/robotics/sumorobot-manager/default.nix

45 lines
1.2 KiB
Nix
Raw Normal View History

2020-09-05 20:05:36 +01:00
{ lib, stdenv, python3, qt5, fetchFromGitHub, wrapPython, pyqt5, pyserial, dos2unix }:
2019-08-24 17:10:21 +01:00
stdenv.mkDerivation rec {
pname = "sumorobot-manager";
2020-09-05 20:05:36 +01:00
version = "1.0.0";
2019-08-24 17:10:21 +01:00
src = fetchFromGitHub {
owner = "robokoding";
repo = pname;
rev = "v${version}";
2020-09-05 20:05:36 +01:00
sha256 = "07snhwmqqp52vdgr66vx50zxx0nmpmns5cdjgh50hzlhji2z1fl9";
2019-08-24 17:10:21 +01:00
};
buildInputs = [ python3 ];
pythonPath = [
2021-05-02 01:12:19 +01:00
pyqt5.dev pyserial
2019-08-24 17:10:21 +01:00
];
2021-05-02 01:12:19 +01:00
nativeBuildInputs = [ wrapPython qt5.wrapQtAppsHook dos2unix ];
2019-08-24 17:10:21 +01:00
buildPhase = "true";
installPhase = ''
mkdir -p $out/opt/sumorobot-manager
cp -r main.py lib res $out/opt/sumorobot-manager
chmod -R 644 $out/opt/sumorobot-manager/lib/*
mkdir $out/bin
2021-05-02 01:12:19 +01:00
dos2unix $out/opt/sumorobot-manager/main.py
2019-08-24 17:10:21 +01:00
makeQtWrapper $out/opt/sumorobot-manager/main.py $out/bin/sumorobot-manager \
--run "cd $out/opt/sumorobot-manager"
'';
preFixup = ''
patchShebangs $out/opt/sumorobot-manager/main.py
wrapPythonProgramsIn "$out/opt" "$pythonPath"
'';
meta = with lib; {
2019-08-24 17:10:21 +01:00
description = "Desktop App for managing SumoRobots";
homepage = "https://www.robokoding.com/kits/sumorobot/sumomanager/";
license = licenses.mit;
maintainers = with maintainers; [ abbradar ];
};
}