2018-02-24 13:12:44 +00:00
|
|
|
{ wxGTK, lib, stdenv, fetchFromGitHub, cmake, libGLU_combined, zlib
|
2017-12-11 19:38:08 +00:00
|
|
|
, libX11, gettext, glew, glm, cairo, curl, openssl, boost, pkgconfig
|
|
|
|
, doxygen, pcre, libpthreadstubs, libXdmcp
|
2017-12-11 13:37:01 +00:00
|
|
|
|
2018-07-17 21:11:16 +01:00
|
|
|
, oceSupport ? true, opencascade
|
2018-03-22 21:58:57 +00:00
|
|
|
, ngspiceSupport ? true, libngspice
|
2017-12-11 19:38:08 +00:00
|
|
|
, scriptingSupport ? true, swig, python, wxPython
|
|
|
|
}:
|
|
|
|
|
2018-03-22 21:58:57 +00:00
|
|
|
assert ngspiceSupport -> libngspice != null;
|
|
|
|
|
2017-12-11 19:38:08 +00:00
|
|
|
with lib;
|
2017-12-11 13:37:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "kicad-unstable-${version}";
|
2018-06-11 02:36:47 +01:00
|
|
|
version = "2018-06-12";
|
2017-12-11 13:37:01 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2017-12-11 19:38:08 +00:00
|
|
|
owner = "KICad";
|
|
|
|
repo = "kicad-source-mirror";
|
2018-06-11 02:36:47 +01:00
|
|
|
rev = "bc7bd107d980da147ad515aeae0469ddd55c2368";
|
|
|
|
sha256 = "11nsx52pd3jr2wbzr11glmcs1a9r7z1mqkqx6yvlm0awbgd8qlv8";
|
2017-12-11 19:38:08 +00:00
|
|
|
};
|
2017-12-11 13:37:01 +00:00
|
|
|
|
2017-12-17 05:02:51 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace CMakeModules/KiCadVersion.cmake \
|
|
|
|
--replace no-vcs-found ${version}
|
|
|
|
'';
|
|
|
|
|
|
|
|
cmakeFlags =
|
2018-07-17 21:11:16 +01:00
|
|
|
optionals (oceSupport) [ "-DKICAD_USE_OCE=ON" "-DOCE_DIR=${opencascade}" ]
|
2017-12-11 19:38:08 +00:00
|
|
|
++ optional (ngspiceSupport) "-DKICAD_SPICE=ON"
|
|
|
|
++ optionals (scriptingSupport) [
|
|
|
|
"-DKICAD_SCRIPTING=ON"
|
|
|
|
"-DKICAD_SCRIPTING_MODULES=ON"
|
|
|
|
"-DKICAD_SCRIPTING_WXPYTHON=ON"
|
|
|
|
# nix installs wxPython headers in wxPython package, not in wxwidget
|
|
|
|
# as assumed. We explicitely set the header location.
|
|
|
|
"-DCMAKE_CXX_FLAGS=-I${wxPython}/include/wx-3.0"
|
|
|
|
];
|
2017-12-11 13:37:01 +00:00
|
|
|
|
2018-08-13 00:47:02 +01:00
|
|
|
nativeBuildInputs = [ cmake doxygen pkgconfig ];
|
2017-12-11 19:38:08 +00:00
|
|
|
buildInputs = [
|
2018-02-24 13:12:44 +00:00
|
|
|
libGLU_combined zlib libX11 wxGTK pcre libXdmcp gettext glew glm libpthreadstubs
|
2017-12-11 19:38:08 +00:00
|
|
|
cairo curl openssl boost
|
2018-07-17 21:11:16 +01:00
|
|
|
] ++ optional (oceSupport) opencascade
|
2018-03-22 21:58:57 +00:00
|
|
|
++ optional (ngspiceSupport) libngspice
|
2017-12-11 19:38:08 +00:00
|
|
|
++ optionals (scriptingSupport) [ swig python wxPython ];
|
2017-12-11 13:37:01 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Free Software EDA Suite, Nightly Development Build";
|
|
|
|
homepage = http://www.kicad-pcb.org/;
|
2017-12-11 19:38:08 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ berce ];
|
|
|
|
platforms = with platforms; linux;
|
2017-12-11 13:37:01 +00:00
|
|
|
};
|
|
|
|
}
|