about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/science/robotics
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/science/robotics')
-rw-r--r--nixpkgs/pkgs/applications/science/robotics/apmplanner2/default.nix53
-rw-r--r--nixpkgs/pkgs/applications/science/robotics/betaflight-configurator/default.nix50
-rw-r--r--nixpkgs/pkgs/applications/science/robotics/gazebo/6.nix8
-rw-r--r--nixpkgs/pkgs/applications/science/robotics/gazebo/default.nix84
-rw-r--r--nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/default.nix73
-rw-r--r--nixpkgs/pkgs/applications/science/robotics/yarp/default.nix37
6 files changed, 305 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/science/robotics/apmplanner2/default.nix b/nixpkgs/pkgs/applications/science/robotics/apmplanner2/default.nix
new file mode 100644
index 000000000000..ecbf0c703f19
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/robotics/apmplanner2/default.nix
@@ -0,0 +1,53 @@
+{ lib, mkDerivation, fetchFromGitHub, fetchpatch, qmake
+, qtbase, qtscript, qtwebkit, qtserialport, qtsvg, qtdeclarative, qtquickcontrols2
+, alsaLib, libsndfile, flite, openssl, udev, SDL2
+}:
+
+mkDerivation rec {
+  pname = "apmplanner2";
+  version = "2.0.27-rc1";
+
+  src = fetchFromGitHub {
+    owner = "ArduPilot";
+    repo = "apm_planner";
+    rev = "${version}";
+    sha256 = "1k0786mjzi49nb6yw4chh9l4dmkf9gybpxg9zqkr5yg019nyzcvd";
+  };
+
+  patches = [
+    # can be dropped after 2.0.27-rc1
+    (fetchpatch {
+      url = "https://github.com/ArduPilot/apm_planner/commit/299ff23b5e9910de04edfc06b6893bb06b47a57b.patch";
+      sha256 = "16rc81iwqp2i46g6bm9lbvcjfsk83999r9h8w1pz0mys7rsilvqy";
+    })
+  ];
+
+  buildInputs = [
+    alsaLib libsndfile flite openssl udev SDL2
+    qtbase qtscript qtwebkit qtserialport qtsvg qtdeclarative qtquickcontrols2
+  ];
+
+  nativeBuildInputs = [ qmake ];
+
+  qmakeFlags = [ "apm_planner.pro" ];
+
+  # this ugly hack is necessary, as `bin/apmplanner2` needs the contents of `share/APMPlanner2` inside of `bin/`
+  preFixup = ''
+    ln --relative --symbolic $out/share/APMPlanner2/* $out/bin/
+    substituteInPlace $out/share/applications/apmplanner2.desktop \
+                      --replace /usr $out
+  '';
+
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Ground station software for autonomous vehicles";
+    longDescription = ''
+      A GUI ground control station for autonomous vehicles using the MAVLink protocol.
+      Includes support for the APM and PX4 based controllers.
+    '';
+    homepage = http://ardupilot.org/planner2/;
+    license = lib.licenses.gpl3;
+    maintainers = with lib.maintainers; [ wucke13 ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/robotics/betaflight-configurator/default.nix b/nixpkgs/pkgs/applications/science/robotics/betaflight-configurator/default.nix
new file mode 100644
index 000000000000..6449e966959b
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/robotics/betaflight-configurator/default.nix
@@ -0,0 +1,50 @@
+{stdenv, fetchurl, unzip, makeDesktopItem, nwjs, wrapGAppsHook, gsettings-desktop-schemas, gtk3 }:
+
+let
+  strippedName = "betaflight-configurator";
+  desktopItem = makeDesktopItem {
+    name = strippedName;
+    exec = strippedName;
+    icon = "${strippedName}-icon.png";
+    comment = "Betaflight configuration tool";
+    desktopName = "Betaflight Configurator";
+    genericName = "Flight controller configuration tool";
+  };
+in
+stdenv.mkDerivation rec {
+  name = "${strippedName}-${version}";
+  version = "10.5.1";
+  src = fetchurl {
+    url = "https://github.com/betaflight/betaflight-configurator/releases/download/${version}/${strippedName}_${version}_linux64.zip";
+    sha256 = "1l4blqgaqfrnydk05q6pwdqdhcly2f8nwzrv0749cqmfiinh8ygc";
+  };
+
+  nativeBuildInputs = [ wrapGAppsHook ];
+  
+  buildInputs = [ unzip gsettings-desktop-schemas gtk3 ];
+  
+  installPhase = ''
+    mkdir -p $out/bin \
+             $out/opt/${strippedName} \
+             $out/share/icons
+
+    cp -r . $out/opt/${strippedName}/
+    cp icon/*_icon_128.png $out/share/icons/${strippedName}-icon.png
+    cp -r ${desktopItem}/share/applications $out/share/
+
+    makeWrapper ${nwjs}/bin/nw $out/bin/${strippedName} --add-flags $out/opt/${strippedName}
+  '';
+
+  meta = with stdenv.lib; {
+    description = "The Betaflight flight control system configuration tool";
+    longDescription = ''
+      A crossplatform configuration tool for the Betaflight flight control system.
+      Various types of aircraft are supported by the tool and by Betaflight, e.g. 
+      quadcopters, hexacopters, octocopters and fixed-wing aircraft.
+    '';
+    homepage    = https://github.com/betaflight/betaflight/wiki;
+    license     = licenses.gpl3;
+    maintainers = with maintainers; [ wucke13 ];
+    platforms   = platforms.linux;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/robotics/gazebo/6.nix b/nixpkgs/pkgs/applications/science/robotics/gazebo/6.nix
new file mode 100644
index 000000000000..0d1aa4a9085f
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/robotics/gazebo/6.nix
@@ -0,0 +1,8 @@
+{ stdenv, fetchurl, callPackage, ignition, gazeboSimulator, ... } @ args:
+
+callPackage ./default.nix (args // rec {
+  version = "6.5.1";
+  src-sha256 = "96260aa23f1a1f24bc116f8e359d31f3bc65011033977cb7fb2c64d574321908";
+  sdformat = gazeboSimulator.sdformat3;
+})
+
diff --git a/nixpkgs/pkgs/applications/science/robotics/gazebo/default.nix b/nixpkgs/pkgs/applications/science/robotics/gazebo/default.nix
new file mode 100644
index 000000000000..98ccd92c4ee5
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/robotics/gazebo/default.nix
@@ -0,0 +1,84 @@
+{ stdenv, fetchurl, cmake, pkgconfig, boost, protobuf, freeimage
+  , boost-build, boost_process
+  , xorg_sys_opengl, tbb, ogre, tinyxml-2
+  , libtar, glxinfo,  libusb, libxslt, ignition
+  , pythonPackages, utillinux
+
+  # these deps are hidden; cmake doesn't catch them
+  , gazeboSimulator, sdformat ? gazeboSimulator.sdformat, curl, tinyxml, qt4
+  , xlibsWrapper
+  , withIgnitionTransport ? true
+  , libav, withLibAvSupport ? true
+  , openal, withAudioSupport ? false
+  , withQuickBuild ? false, withHeadless ? false, withLowMemorySupport ? false
+  , doxygen, withDocs ? true
+  , bullet, withBulletEngineSupport ? false
+  , graphviz, withModelEditorSchematicView ? true # graphviz needed for this view
+  , gdal, withDigitalElevationTerrainsSupport ? true
+  , gts, withConstructiveSolidGeometrySupport ? true
+  , hdf5, withHdf5Support ? true
+  , version ? "7.0.0"
+  , src-sha256 ? "127q2g93kvmak2b6vhl13xzg56h09v14s4pki8wv7aqjv0c3whbl"
+  , ...
+}: with stdenv.lib;
+
+stdenv.mkDerivation rec {
+  inherit version;
+  name = "gazebo-${version}";
+
+  src = fetchurl {
+    url = "https://osrf-distributions.s3.amazonaws.com/gazebo/releases/${name}.tar.bz2";
+    sha256 = src-sha256;
+  };
+
+  enableParallelBuilding = true; # gazebo needs this so bad
+  cmakeFlags = [
+  "-DCMAKE_INSTALL_LIBDIR:PATH=lib"
+  "-DCMAKE_INSTALL_INCLUDEDIR=include" ]
+    ++ optional withQuickBuild [ "-DENABLE_TESTS_COMPILATION=False" ]
+    ++ optional withLowMemorySupport [ "-DUSE_LOW_MEMORY_TESTS=True" ]
+    ++ optional withHeadless [ "-DENABLE_SCREEN_TESTS=False" ];
+
+  nativeBuildInputs = [ cmake pkgconfig ];
+
+  propagatedNativeBuildInputs = [ boost boost-build boost_process protobuf ];
+
+  buildInputs = [
+    #cmake boost protobuf
+    freeimage
+    xorg_sys_opengl
+    tbb
+    ogre
+    tinyxml-2
+    libtar
+    glxinfo
+    libusb
+    libxslt
+    ignition.math2
+    sdformat
+    pythonPackages.pyopengl
+
+    # TODO: add these hidden deps to cmake configuration & submit upstream
+    curl
+    tinyxml
+    xlibsWrapper
+    qt4
+  ] ++ optional stdenv.isLinux utillinux # on Linux needs uuid/uuid.h
+    ++ optional withDocs doxygen
+    ++ optional withLibAvSupport libav  #TODO: package rubygem-ronn and put it here
+    ++ optional withAudioSupport openal
+    ++ optional withBulletEngineSupport bullet
+    ++ optional withIgnitionTransport ignition.transport
+    ++ optional withModelEditorSchematicView graphviz
+    ++ optional withDigitalElevationTerrainsSupport gdal
+    ++ optional withConstructiveSolidGeometrySupport gts
+    ++ optional withHdf5Support hdf5;
+
+  meta = with stdenv.lib; {
+    homepage = http://gazebosim.org/;
+    description = "Multi-robot simulator for outdoor environments";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ pxc ];
+    platforms = platforms.all;
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/default.nix b/nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/default.nix
new file mode 100644
index 000000000000..eae5d3766d6d
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/robotics/qgroundcontrol/default.nix
@@ -0,0 +1,73 @@
+{ stdenv, fetchgit, git,  SDL2, udev, doxygen
+, qtbase, qtlocation, qtserialport, qtdeclarative, qtconnectivity, qtxmlpatterns
+, qtsvg, qtquick1, qtquickcontrols, qtgraphicaleffects, qmake, qtspeech
+, makeWrapper
+, gst_all_1, pkgconfig
+}:
+
+stdenv.mkDerivation rec {
+  name = "qgroundcontrol-${version}";
+  version = "3.3.0";
+
+  qtInputs = [
+    qtbase qtlocation qtserialport qtdeclarative qtconnectivity qtxmlpatterns qtsvg
+    qtquick1 qtquickcontrols qtgraphicaleffects qtspeech
+  ];
+
+  gstInputs = with gst_all_1; [
+    gstreamer gst-plugins-base
+  ];
+
+  enableParallelBuilding = true;
+  buildInputs = [ SDL2 udev doxygen git ] ++ gstInputs ++ qtInputs;
+  nativeBuildInputs = [ pkgconfig makeWrapper qmake ];
+
+  preConfigure = ''
+    mkdir build
+    cd build
+  '';
+
+  qmakeFlags = [
+    # Default install tries to copy Qt files into package
+    "CONFIG+=QGC_DISABLE_BUILD_SETUP"
+    "../qgroundcontrol.pro"
+  ];
+
+  installPhase = ''
+    cd ..
+
+    mkdir -p $out/share/applications
+    sed 's/Exec=.*$/Exec=QGroundControl/g' --in-place deploy/qgroundcontrol.desktop
+    cp -v deploy/qgroundcontrol.desktop $out/share/applications
+
+    mkdir -p $out/bin
+    cp -v build/release/QGroundControl "$out/bin/"
+
+    mkdir -p $out/share/qgroundcontrol
+    cp -rv resources/ $out/share/qgroundcontrol
+
+    mkdir -p $out/share/pixmaps
+    cp -v resources/icons/qgroundcontrol.png $out/share/pixmaps
+  '';
+
+  postInstall = ''
+    wrapProgram "$out/bin/qgroundcontrol" \
+      --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH"
+  '';
+
+  # TODO: package mavlink so we can build from a normal source tarball
+  src = fetchgit {
+    url = "https://github.com/mavlink/qgroundcontrol.git";
+    rev = "refs/tags/v${version}";
+    sha256 = "0abjm0wywp24qlgg9w8g35ijprjg5csq4fgba9caaiwvmpfbhmpw";
+    fetchSubmodules = true;
+  };
+
+  meta = with stdenv.lib; {
+    description = "Provides full ground station support and configuration for the PX4 and APM Flight Stacks";
+    homepage = http://qgroundcontrol.org/;
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ pxc ];
+  };
+}
diff --git a/nixpkgs/pkgs/applications/science/robotics/yarp/default.nix b/nixpkgs/pkgs/applications/science/robotics/yarp/default.nix
new file mode 100644
index 000000000000..507481cddab2
--- /dev/null
+++ b/nixpkgs/pkgs/applications/science/robotics/yarp/default.nix
@@ -0,0 +1,37 @@
+{ stdenv, fetchFromGitHub, cmake, ace
+}:
+
+stdenv.mkDerivation rec {
+  name = "yarp-${version}";
+  version = "2.3.70.2";
+  src = fetchFromGitHub {
+    owner = "robotology";
+    repo = "yarp";
+    rev = "v${version}";
+    sha256 = "0mphh899niy30xbjjwi9xpsliq8mladfldbbbjfngdrqfhiray1a";
+  };
+
+  buildInputs = [ cmake ace ];
+
+  enableParallelBuilding = true;
+
+  cmakeFlags = [
+    "-DYARP_COMPILE_UNMAINTAINED:BOOL=ON"
+    "-DCREATE_YARPC:BOOL=ON"
+    "-DCREATE_YARPCXX:BOOL=ON"
+  ];
+
+  # since we cant expand $out in cmakeFlags
+  preConfigure = ''cmakeFlags="$cmakeFlags -DCMAKE_INSTALL_LIBDIR=$out/lib"'';
+
+  postInstall = "mv ./$out/lib/*.so $out/lib/";
+
+  meta = {
+    description = "Yet Another Robot Platform";
+    homepage = http://yarp.it;
+    license = stdenv.lib.licenses.lgpl21;
+    platforms = stdenv.lib.platforms.linux;
+    maintainers = [ stdenv.lib.maintainers.nico202 ];
+  };
+}
+