kicad: 4.0.7 -> 5.0.0
This commit is contained in:
parent
e7be6e0d00
commit
a4c932fa51
@ -1,72 +1,56 @@
|
|||||||
{ stdenv, fetchurl, cmake, libGLU_combined, wxGTK, zlib, libX11, gettext, glew, cairo, curl, openssl, boost, pkgconfig, doxygen }:
|
{ wxGTK, lib, stdenv, fetchurl, cmake, libGLU_combined, zlib
|
||||||
|
, libX11, gettext, glew, glm, cairo, curl, openssl, boost, pkgconfig
|
||||||
|
, doxygen, pcre, libpthreadstubs, libXdmcp
|
||||||
|
|
||||||
|
, oceSupport ? true, opencascade
|
||||||
|
, ngspiceSupport ? true, libngspice
|
||||||
|
, scriptingSupport ? true, swig, python, wxPython
|
||||||
|
}:
|
||||||
|
|
||||||
|
assert ngspiceSupport -> libngspice != null;
|
||||||
|
|
||||||
|
with lib;
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "kicad-${version}";
|
name = "kicad-${version}";
|
||||||
series = "4.0";
|
series = "5.0";
|
||||||
version = "4.0.7";
|
version = "5.0.0";
|
||||||
|
|
||||||
srcs = [
|
src = fetchurl {
|
||||||
(fetchurl {
|
url = "https://launchpad.net/kicad/${series}/${version}/+download/kicad-${version}.tar.xz";
|
||||||
url = "https://code.launchpad.net/kicad/${series}/${version}/+download/kicad-${version}.tar.xz";
|
sha256 = "17nqjszyvd25wi6550j981whlnb1wxzmlanljdjihiki53j84x9p";
|
||||||
sha256 = "1hgxan9321szgyqnkflb0q60yjf4yvbcc4cpwhm0yz89qrvlq1q9";
|
};
|
||||||
})
|
|
||||||
|
|
||||||
(fetchurl {
|
postPatch = ''
|
||||||
url = "http://downloads.kicad-pcb.org/libraries/kicad-library-${version}.tar.gz";
|
substituteInPlace CMakeModules/KiCadVersion.cmake \
|
||||||
sha256 = "1azb7v1y3l6j329r9gg7f4zlg0wz8nh4s4i5i0l9s4yh9r6i9zmv";
|
--replace no-vcs-found ${version}
|
||||||
})
|
|
||||||
|
|
||||||
(fetchurl {
|
|
||||||
url = "http://downloads.kicad-pcb.org/libraries/kicad-footprints-${version}.tar.gz";
|
|
||||||
sha256 = "08qrz5zzsb5127jlnv24j0sgiryd5nqwg3lfnwi8j9a25agqk13j";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
sourceRoot = "kicad-${version}";
|
|
||||||
|
|
||||||
cmakeFlags = ''
|
|
||||||
-DKICAD_SKIP_BOOST=ON
|
|
||||||
-DKICAD_BUILD_VERSION=${version}
|
|
||||||
-DKICAD_REPO_NAME=stable
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true; # often fails on Hydra: fatal error: pcb_plot_params_lexer.h: No such file or directory
|
cmakeFlags =
|
||||||
|
optionals (oceSupport) [ "-DKICAD_USE_OCE=ON" "-DOCE_DIR=${opencascade}" ]
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
++ optional (ngspiceSupport) "-DKICAD_SPICE=ON"
|
||||||
buildInputs = [ cmake libGLU_combined wxGTK zlib libX11 gettext glew cairo curl openssl boost doxygen ];
|
++ optionals (scriptingSupport) [
|
||||||
|
"-DKICAD_SCRIPTING=ON"
|
||||||
# They say they only support installs to /usr or /usr/local,
|
"-DKICAD_SCRIPTING_MODULES=ON"
|
||||||
# so we have to handle this.
|
"-DKICAD_SCRIPTING_WXPYTHON=ON"
|
||||||
patchPhase = ''
|
# nix installs wxPython headers in wxPython package, not in wxwidget
|
||||||
sed -i -e 's,/usr/local/kicad,'$out,g common/gestfich.cpp
|
# as assumed. We explicitely set the header location.
|
||||||
'';
|
"-DCMAKE_CXX_FLAGS=-I${wxPython}/include/wx-3.0"
|
||||||
|
];
|
||||||
postUnpack = ''
|
|
||||||
pushd $(pwd)
|
|
||||||
'';
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
popd
|
|
||||||
|
|
||||||
pushd kicad-library-*
|
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=$out
|
|
||||||
make $MAKE_FLAGS
|
|
||||||
make install
|
|
||||||
popd
|
|
||||||
|
|
||||||
pushd kicad-footprints-*
|
|
||||||
mkdir -p $out/share/kicad/modules
|
|
||||||
cp -R *.pretty $out/share/kicad/modules/
|
|
||||||
popd
|
|
||||||
'';
|
|
||||||
|
|
||||||
|
# https://www.mail-archive.com/kicad-developers@lists.launchpad.net/msg29840.html
|
||||||
|
nativeBuildInputs = [ (cmake.override {majorVersion = "3.10";}) doxygen pkgconfig ];
|
||||||
|
buildInputs = [
|
||||||
|
libGLU_combined zlib libX11 wxGTK pcre libXdmcp gettext glew glm libpthreadstubs
|
||||||
|
cairo curl openssl boost
|
||||||
|
] ++ optional (oceSupport) opencascade
|
||||||
|
++ optional (ngspiceSupport) libngspice
|
||||||
|
++ optionals (scriptingSupport) [ swig python wxPython ];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Free Software EDA Suite";
|
description = "Free Software EDA Suite";
|
||||||
homepage = http://www.kicad-pcb.org/;
|
homepage = http://www.kicad-pcb.org/;
|
||||||
license = stdenv.lib.licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
maintainers = with stdenv.lib.maintainers; [viric];
|
maintainers = with maintainers; [ berce ];
|
||||||
platforms = with stdenv.lib.platforms; linux;
|
platforms = with platforms; linux;
|
||||||
hydraPlatforms = []; # 'output limit exceeded' error on hydra
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -20744,6 +20744,7 @@ with pkgs;
|
|||||||
|
|
||||||
kicad = callPackage ../applications/science/electronics/kicad {
|
kicad = callPackage ../applications/science/electronics/kicad {
|
||||||
wxGTK = wxGTK30;
|
wxGTK = wxGTK30;
|
||||||
|
inherit (pythonPackages) wxPython;
|
||||||
boost = boost160;
|
boost = boost160;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user