Skip to content

Commit

Permalink
librepcb-unstable: init at 2017-12-29 (#33630)
Browse files Browse the repository at this point in the history
  • Loading branch information
Luz authored and Mic92 committed Jan 11, 2018
1 parent 2f6b885 commit e056315
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/maintainers.nix
Expand Up @@ -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>";
Expand Down
33 changes: 33 additions & 0 deletions 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;
};
}
29 changes: 29 additions & 0 deletions 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
****************************************************************************************/

2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -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 { };
Expand Down

0 comments on commit e056315

Please sign in to comment.