Created
June 3, 2019 18:55
-
-
Save nschoe/12c1176f16cc57872fd86fcb05db7300 to your computer and use it in GitHub Desktop.
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
## This is python_qt_binding/default.nix | |
{ stdenv | |
, mkRosPackage | |
, fetchFromGitHub | |
, catkin | |
, rosbuild | |
}: | |
let | |
pname = "python_qt_binding"; | |
version = "0.3.5"; | |
rosdistro = "melodic"; | |
in mkRosPackage { | |
name = "${pname}-${version}"; | |
src = fetchFromGitHub { | |
owner = "ros-gbp"; | |
repo = "python_qt_binding-release"; | |
rev = "release/${rosdistro}/${pname}/${version}-0"; | |
sha256 = "0bpp1j33vc518sx7a9j2dkjidj96w711dawkw095h4qhrwr27bnh"; | |
}; | |
propagatedBuildInputs = [ catkin rosbuild ]; | |
meta = with stdenv.lib; { | |
description = "Provides Python bindings for Qt."; | |
homepage = http://wiki.ros.org/python_qt_binding; | |
license = licenses.bsd3; | |
maintainers = [ maintainers.akru mintainers.nschoe ]; | |
}; | |
} | |
# This is the definition of mkRosPackage | |
denv | |
, cmake | |
, catkin | |
, python3Packages | |
, python3 | |
}: | |
attrs: | |
stdenv.mkDerivation (attrs // rec { | |
propagatedBuildInputs = with python3Packages; | |
[ python3 cmake catkin_pkg rospkg catkin ] ++ (attrs.propagatedBuildInputs or []); | |
# Disable testing by default | |
doCheck = attrs.doCheck or false; | |
ROS_LANG_DISABLE = "geneus:genlisp:gennodejs"; | |
cmakeFlags = "-DCATKIN_ENABLE_TESTING=${if doCheck then "ON" else "OFF"} -DSETUPTOOLS_DEB_LAYOUT=OFF"; | |
preConfigure = '' | |
if [ ! -e CMakeLists.txt ]; then | |
catkin_init_workspace | |
fi | |
''; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment