diff options
author | Luz <Luz@users.noreply.github.com> | 2018-01-11 10:20:00 +0100 |
---|---|---|
committer | Jörg Thalheim <Mic92@users.noreply.github.com> | 2018-01-11 09:20:00 +0000 |
commit | e056315a3e7f85f60ad70c7ad837ef6a7c6a804e (patch) | |
tree | 5377ee484dc9b4fc9561be4ed0fe6500c882bcfd | |
parent | 2f6b88551ba76eaf7ec1f0cf9dec02c3ffb284f7 (diff) | |
download | nixlib-e056315a3e7f85f60ad70c7ad837ef6a7c6a804e.tar nixlib-e056315a3e7f85f60ad70c7ad837ef6a7c6a804e.tar.gz nixlib-e056315a3e7f85f60ad70c7ad837ef6a7c6a804e.tar.bz2 nixlib-e056315a3e7f85f60ad70c7ad837ef6a7c6a804e.tar.lz nixlib-e056315a3e7f85f60ad70c7ad837ef6a7c6a804e.tar.xz nixlib-e056315a3e7f85f60ad70c7ad837ef6a7c6a804e.tar.zst nixlib-e056315a3e7f85f60ad70c7ad837ef6a7c6a804e.zip |
librepcb-unstable: init at 2017-12-29 (#33630)
-rw-r--r-- | lib/maintainers.nix | 1 | ||||
-rw-r--r-- | pkgs/applications/science/electronics/librepcb/default.nix | 33 | ||||
-rw-r--r-- | pkgs/applications/science/electronics/librepcb/fix-2017-12.patch | 29 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
4 files changed, 65 insertions, 0 deletions
diff --git a/lib/maintainers.nix b/lib/maintainers.nix index d06cea51e675..b7b5232c170b 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -389,6 +389,7 @@ lufia = "Kyohei Kadota <lufia@lufia.org>"; luispedro = "Luis Pedro Coelho <luis@luispedro.org>"; lukego = "Luke Gorrie <luke@snabb.co>"; + luz = "Luz <luz666@daum.net>"; lw = "Sergey Sofeychuk <lw@fmap.me>"; lyt = "Tim Liou <wheatdoge@gmail.com>"; m3tti = "Mathaeus Sander <mathaeus.peter.sander@gmail.com>"; diff --git a/pkgs/applications/science/electronics/librepcb/default.nix b/pkgs/applications/science/electronics/librepcb/default.nix new file mode 100644 index 000000000000..f4418f535632 --- /dev/null +++ b/pkgs/applications/science/electronics/librepcb/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchFromGitHub, qtbase, qttools, qmake, mesa, openssl, zlib }: + +stdenv.mkDerivation rec { + name = "librepcb-${version}"; + version = "20171229"; + + src = fetchFromGitHub { + owner = "LibrePCB"; + repo = "LibrePCB"; + fetchSubmodules = true; + rev = "4efb06fa42755abc5e606da4669cc17e8de2f8c6"; + sha256 = "0r33fm1djqpy0dzvnf5gv2dfh5nj2acaxb7w4cn8yxdgrazjf7ak"; + }; + + enableParallelBuilding = true; + + nativeBuildInputs = [ qmake qttools ]; + + buildInputs = [ qtbase ]; + + # LibrePCB still supports QT below 5.9. But some code lines break the build, so they are removed by this patch so that the software builds. + patches = [ ./fix-2017-12.patch ]; + + qmakeFlags = ["-r"]; + + meta = with stdenv.lib; { + description = "A free EDA software to develop printed circuit boards"; + homepage = http://librepcb.org/; + maintainers = with maintainers; [ luz ]; + license = licenses.gpl3; + platforms = platforms.linux; + }; +} diff --git a/pkgs/applications/science/electronics/librepcb/fix-2017-12.patch b/pkgs/applications/science/electronics/librepcb/fix-2017-12.patch new file mode 100644 index 000000000000..75fc590ad7fe --- /dev/null +++ b/pkgs/applications/science/electronics/librepcb/fix-2017-12.patch @@ -0,0 +1,29 @@ +--- a/libs/librepcb/common/fileio/serializableobjectlist.h ++++ b/libs/librepcb/common/fileio/serializableobjectlist.h +@@ -374,26 +374,6 @@ + } // namespace librepcb + + /***************************************************************************************** +- * Prevent from using SerializableObjectList in a foreach loop because it always would +- * create a deep copy of the list! You should use C++11 range based for loops instead. +- ****************************************************************************************/ +- +-#if (QT_VERSION > QT_VERSION_CHECK(5, 9, 0)) +-#define QFOREACHCONTAINER_TEMPLATE QtPrivate::QForeachContainer +-#else +-#define QFOREACHCONTAINER_TEMPLATE QForeachContainer +-#endif +- +-template <typename T, typename P> +-class QFOREACHCONTAINER_TEMPLATE<librepcb::SerializableObjectList<T, P>> { public: +- ~QForeachContainer() = delete; +-}; +-template <typename T, typename P> +-class QFOREACHCONTAINER_TEMPLATE<const librepcb::SerializableObjectList<T, P>> { public: +- ~QForeachContainer() = delete; +-}; +- +-/***************************************************************************************** + * End of File + ****************************************************************************************/ + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 68244c40b1e1..1136208bf30c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19179,6 +19179,8 @@ with pkgs; boost = boost160; }; + librepcb = libsForQt5.callPackage ../applications/science/electronics/librepcb { }; + ngspice = callPackage ../applications/science/electronics/ngspice { }; pcb = callPackage ../applications/science/electronics/pcb { }; |