Merge pull request #100065 from matthuszagh/kicad
This commit is contained in:
commit
967a01f206
@ -1,23 +1,51 @@
|
|||||||
{ lib, stdenv, fetchFromGitLab, cmake, libGLU, libGL, zlib, wxGTK
|
{ lib
|
||||||
, libX11, gettext, glew, glm, cairo, curl, openssl, boost, pkgconfig
|
, stdenv
|
||||||
, doxygen, pcre, libpthreadstubs, libXdmcp, fetchpatch, lndir, callPackages
|
, fetchFromGitLab
|
||||||
|
, cmake
|
||||||
|
, libGLU
|
||||||
|
, libGL
|
||||||
|
, zlib
|
||||||
|
, wxGTK
|
||||||
|
, libX11
|
||||||
|
, gettext
|
||||||
|
, glew
|
||||||
|
, glm
|
||||||
|
, cairo
|
||||||
|
, curl
|
||||||
|
, openssl
|
||||||
|
, boost
|
||||||
|
, pkgconfig
|
||||||
|
, doxygen
|
||||||
|
, pcre
|
||||||
|
, libpthreadstubs
|
||||||
|
, libXdmcp
|
||||||
|
, fetchpatch
|
||||||
|
, lndir
|
||||||
|
, callPackages
|
||||||
|
|
||||||
, stable ? true
|
, stable ? true
|
||||||
, baseName ? "kicad"
|
, baseName ? "kicad"
|
||||||
, versions ? { }
|
, versions ? { }
|
||||||
, oceSupport ? false, opencascade
|
, oceSupport ? false
|
||||||
, withOCCT ? true, opencascade-occt
|
, opencascade
|
||||||
, ngspiceSupport ? true, libngspice
|
, withOCCT ? true
|
||||||
, scriptingSupport ? true, swig, python, wxPython
|
, opencascade-occt
|
||||||
, debug ? false, valgrind
|
, ngspiceSupport ? true
|
||||||
|
, libngspice
|
||||||
|
, scriptingSupport ? true
|
||||||
|
, swig
|
||||||
|
, python
|
||||||
|
, wxPython
|
||||||
|
, debug ? false
|
||||||
|
, valgrind
|
||||||
, withI18n ? true
|
, withI18n ? true
|
||||||
|
, gtk3
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert ngspiceSupport -> libngspice != null;
|
assert ngspiceSupport -> libngspice != null;
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
|
|
||||||
versionConfig = versions.${baseName};
|
versionConfig = versions.${baseName};
|
||||||
|
|
||||||
# oce on aarch64 fails a test
|
# oce on aarch64 fails a test
|
||||||
@ -95,8 +123,22 @@ stdenv.mkDerivation rec {
|
|||||||
nativeBuildInputs = [ cmake doxygen pkgconfig lndir ];
|
nativeBuildInputs = [ cmake doxygen pkgconfig lndir ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libGLU libGL zlib libX11 wxGTK pcre libXdmcp gettext
|
libGLU
|
||||||
glew glm libpthreadstubs cairo curl openssl boost
|
libGL
|
||||||
|
zlib
|
||||||
|
libX11
|
||||||
|
wxGTK
|
||||||
|
pcre
|
||||||
|
libXdmcp
|
||||||
|
gettext
|
||||||
|
glew
|
||||||
|
glm
|
||||||
|
libpthreadstubs
|
||||||
|
cairo
|
||||||
|
curl
|
||||||
|
openssl
|
||||||
|
boost
|
||||||
|
gtk3
|
||||||
]
|
]
|
||||||
++ optionals (scriptingSupport) [ swig python wxPython ]
|
++ optionals (scriptingSupport) [ swig python wxPython ]
|
||||||
++ optional (ngspiceSupport) libngspice
|
++ optional (ngspiceSupport) libngspice
|
||||||
|
@ -58,7 +58,6 @@ file="${here}/versions.nix"
|
|||||||
# just in case this runs in parallel
|
# just in case this runs in parallel
|
||||||
tmp="${here}/,versions.nix.${RANDOM}"
|
tmp="${here}/,versions.nix.${RANDOM}"
|
||||||
|
|
||||||
# libraries currently on github, move to $gitlab/libraries planned
|
|
||||||
libs=( symbols templates footprints packages3d )
|
libs=( symbols templates footprints packages3d )
|
||||||
|
|
||||||
get_rev="git ls-remote --heads --tags"
|
get_rev="git ls-remote --heads --tags"
|
||||||
@ -67,9 +66,6 @@ gitlab="https://gitlab.com/kicad"
|
|||||||
# append commit hash or tag
|
# append commit hash or tag
|
||||||
gitlab_pre="https://gitlab.com/api/v4/projects/kicad%2Fcode%2Fkicad/repository/archive.tar.gz?sha="
|
gitlab_pre="https://gitlab.com/api/v4/projects/kicad%2Fcode%2Fkicad/repository/archive.tar.gz?sha="
|
||||||
|
|
||||||
# append "-$lib/archive/[hash or tag].tar.gz
|
|
||||||
github="https://github.com/kicad/kicad"
|
|
||||||
|
|
||||||
# not a lib, but separate and already moved to gitlab
|
# not a lib, but separate and already moved to gitlab
|
||||||
i18n="${gitlab}/code/kicad-i18n.git"
|
i18n="${gitlab}/code/kicad-i18n.git"
|
||||||
i18n_pre="https://gitlab.com/api/v4/projects/kicad%2Fcode%2Fkicad-i18n/repository/archive.tar.gz?sha="
|
i18n_pre="https://gitlab.com/api/v4/projects/kicad%2Fcode%2Fkicad-i18n/repository/archive.tar.gz?sha="
|
||||||
@ -147,8 +143,8 @@ for version in "${all_versions[@]}"; do
|
|||||||
|
|
||||||
for lib in "${libs[@]}"; do
|
for lib in "${libs[@]}"; do
|
||||||
echo "Checking ${lib}" >&2
|
echo "Checking ${lib}" >&2
|
||||||
url="${github}-${lib}.git"
|
url="${gitlab}/libraries/kicad-${lib}.git"
|
||||||
lib_rev="$(${get_rev} "${url}" "${version}" | cut -f1)"
|
lib_rev="$(${get_rev} "${url}" "${version}" | cut -f1 | head -n1)"
|
||||||
has_rev="$(grep -sm 1 "\"${pname}\"" -A 19 "${file}" | grep -sm 1 "${lib_rev}" || true)"
|
has_rev="$(grep -sm 1 "\"${pname}\"" -A 19 "${file}" | grep -sm 1 "${lib_rev}" || true)"
|
||||||
has_hash="$(grep -sm 1 "\"${pname}\"" -A 20 "${file}" | grep -sm 1 "${lib}.sha256")"
|
has_hash="$(grep -sm 1 "\"${pname}\"" -A 20 "${file}" | grep -sm 1 "${lib}.sha256")"
|
||||||
if [[ -n ${has_rev} && -n ${has_hash} && -z ${clean} ]]; then
|
if [[ -n ${has_rev} && -n ${has_hash} && -z ${clean} ]]; then
|
||||||
@ -161,7 +157,7 @@ for version in "${all_versions[@]}"; do
|
|||||||
esac
|
esac
|
||||||
printf "\"%s\";\n" "${lib_rev}"
|
printf "\"%s\";\n" "${lib_rev}"
|
||||||
printf "%8s%s.sha256 =\t\"%s\";\n" "" \
|
printf "%8s%s.sha256 =\t\"%s\";\n" "" \
|
||||||
"${lib}" "$(${prefetch} "${github}-${lib}/archive/${lib_rev}.tar.gz")"
|
"${lib}" "$(${prefetch} "https://gitlab.com/api/v4/projects/kicad%2Flibraries%2Fkicad-${lib}/repository/archive.tar.gz?sha=${lib_rev}")"
|
||||||
count=$((count+1))
|
count=$((count+1))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -27,25 +27,25 @@
|
|||||||
};
|
};
|
||||||
"kicad-unstable" = {
|
"kicad-unstable" = {
|
||||||
kicadVersion = {
|
kicadVersion = {
|
||||||
version = "2020-08-22";
|
version = "2020-10-09";
|
||||||
src = {
|
src = {
|
||||||
rev = "a2341f0f335b0abb9fc8cb86d19cbe6f9b38fade";
|
rev = "560428a70f0196fb4ade620042c5ddefc1685ebe";
|
||||||
sha256 = "0167yb39f800xarq3khn7sbdkgcx9j2ayhy8c7lhhks6kh7459g0";
|
sha256 = "0rzn83bpl06v1d49lcvwfg93nirn684bqqq536zxhmjm0ayx29ka";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
libVersion = {
|
libVersion = {
|
||||||
version = "2020-08-22";
|
version = "2020-10-09";
|
||||||
libSources = {
|
libSources = {
|
||||||
i18n.rev = "cbbb1efd940094bf0c3168280698b2b059a8c509";
|
i18n.rev = "d24af2da8cab4ce1081c401909a4a880514e5549";
|
||||||
i18n.sha256 = "1q4jakn6m8smnr2mg7jgb520nrb6fag9mdvlcpx3smp3qbxka818";
|
i18n.sha256 = "0r0sv52k84sw4jxf10lrmzwmn58d2fv5h57fdrspnmvnh10q63xf";
|
||||||
symbols.rev = "9ca6a5348cdeb88e699582d4ed051ff7303b44d3";
|
symbols.rev = "9c50f4333bafc5a1abf7786436db5ffb6a66758d";
|
||||||
symbols.sha256 = "13w6pb34rhz96rnar25z7kiscy6q1fm8l39hq1bpb8g9yn86ssz4";
|
symbols.sha256 = "06ic59svz0256isy93863i5ay4k8wshvp1kspnqrc776wmq03l3k";
|
||||||
templates.rev = "ae16953b81055855bcede4a33305413599d86a15";
|
templates.rev = "41eae4ccd3ac02fdb969e3aa272c07ab51dcf5af";
|
||||||
templates.sha256 = "1pkv90p3liy3bj4nklxsvpzh9m56p0k5ldr22armvgqfaqaadx9v";
|
templates.sha256 = "0xxfkpsgbnafmpaxpz1747zn7fhqp0kfl32rzjrx4vzxyp25q805";
|
||||||
footprints.rev = "f94c2d5d619d16033f69a555b449f59604d97865";
|
footprints.rev = "50015af7e603cc499199c7e1c6daa7c85dd732ae";
|
||||||
footprints.sha256 = "1g71sk77jvqaf9xvgq6dkyvd9pij2lb4n0bn0dqnwddhwam935db";
|
footprints.sha256 = "16bic67klbj7sgj7cab8ha2fg3ypp9ap82gxkn6ijvpl7dka8bhb";
|
||||||
packages3d.rev = "f699b0e3c13fe75618086913e39279c85da14cc7";
|
packages3d.rev = "df0dc0074491bb665b2c3ce569cbd4aa16118ad6";
|
||||||
packages3d.sha256 = "0m5rb5axa946v729z35ga84in76y4zpk32qzi0hwqx957zy72hs9";
|
packages3d.sha256 = "027jlcp9fpryldjkcxhb1b5bpwqna9kl6r0lnkd86x238kj3rd8v";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user