kicad-unstable-small: init to make kicad-unstable

the -small packages depend on all hydra buildable dependencies
the non-small ones depend on packages3d which exceeds hydra's limit

set platforms to all (kicad is cross-platform)
clarify package differences in the description

set maintainers on just the top level derivation

switch -unstable to not save debug symbols

indicate patch in version string

note broken dependencies
This commit is contained in:
Evils 2020-03-28 01:39:57 +01:00
parent 18a1b153ac
commit 95e4e33bdf
4 changed files with 57 additions and 31 deletions

View File

@ -56,9 +56,11 @@ stdenv.mkDerivation rec {
# tagged releases don't have "unknown" # tagged releases don't have "unknown"
# kicad nightlies use git describe --dirty # kicad nightlies use git describe --dirty
# nix removes .git, so its approximated here # nix removes .git, so its approximated here
# "-1" appended to indicate we're adding a patch
postPatch = '' postPatch = ''
substituteInPlace CMakeModules/KiCadVersion.cmake \ substituteInPlace CMakeModules/KiCadVersion.cmake \
--replace "unknown" ${builtins.substring 0 10 src.rev} --replace "unknown" "${builtins.substring 0 10 src.rev}-1" \
--replace "${version}" "${version}-1"
''; '';
makeFlags = optional (debug) [ "CFLAGS+=-Og" "CFLAGS+=-ggdb" ]; makeFlags = optional (debug) [ "CFLAGS+=-Og" "CFLAGS+=-ggdb" ];
@ -123,7 +125,6 @@ stdenv.mkDerivation rec {
''; '';
homepage = "https://www.kicad-pcb.org/"; homepage = "https://www.kicad-pcb.org/";
license = licenses.agpl3; license = licenses.agpl3;
maintainers = with maintainers; [ evils kiwi berce ]; platforms = platforms.all;
platforms = with platforms; linux;
}; };
} }

View File

@ -4,6 +4,7 @@
, librsvg, cups , librsvg, cups
, pname ? "kicad" , pname ? "kicad"
, stable ? true
, oceSupport ? false, opencascade , oceSupport ? false, opencascade
, withOCCT ? true, opencascade-occt , withOCCT ? true, opencascade-occt
, ngspiceSupport ? true, libngspice , ngspiceSupport ? true, libngspice
@ -18,7 +19,6 @@ assert ngspiceSupport -> libngspice != null;
with lib; with lib;
let let
stable = pname != "kicad-unstable";
baseName = if (stable) then "kicad" else "kicad-unstable"; baseName = if (stable) then "kicad" else "kicad-unstable";
versions = import ./versions.nix; versions = import ./versions.nix;
@ -122,10 +122,11 @@ stdenv.mkDerivation rec {
# and can't git commit if this could be running in parallel with other scripts # and can't git commit if this could be running in parallel with other scripts
passthru.updateScript = [ ./update.sh "all" ]; passthru.updateScript = [ ./update.sh "all" ];
meta = { meta = rec {
description = if (stable) description = (if (stable)
then "Open Source Electronics Design Automation Suite" then "Open Source Electronics Design Automation suite"
else "Open Source EDA Suite, Development Build"; else "Open Source EDA suite, development build")
+ (if (!with3d) then ", without 3D models" else "");
homepage = "https://www.kicad-pcb.org/"; homepage = "https://www.kicad-pcb.org/";
longDescription = '' longDescription = ''
KiCad is an open source software suite for Electronic Design Automation. KiCad is an open source software suite for Electronic Design Automation.
@ -133,12 +134,20 @@ stdenv.mkDerivation rec {
''; '';
license = licenses.agpl3; license = licenses.agpl3;
# berce seems inactive... # berce seems inactive...
maintainers = with maintainers; [ evils kiwi berce ]; maintainers = with stdenv.lib.maintainers; [ evils kiwi berce ];
# kicad's cross-platform, not sure what to fill in here # kicad is cross platform
platforms = with platforms; linux; platforms = stdenv.lib.platforms.all;
} // optionalAttrs with3d { # despite that, nipkgs' wxGTK for darwin is "wxmac"
# We can't download the 3d models on Hydra - they are a ~1 GiB download and # and wxPython_4_0 does not account for this
# they occupy ~5 GiB in store. # adjusting this package to downgrade to python2Packages.wxPython (wxPython 3),
hydraPlatforms = []; # seems like more trouble than fixing wxPython_4_0 would be
# additionally, libngspice is marked as linux only, though it should support darwin
hydraPlatforms = if (with3d) then [ ] else platforms;
# We can't download the 3d models on Hydra,
# they are a ~1 GiB download and they occupy ~5 GiB in store.
# as long as the base and libraries (minus 3d) are build,
# this wrapper does not need to get built
# the kicad-*small "packages" cause this to happen
}; };
} }

View File

@ -13,8 +13,7 @@
with lib; with lib;
let let
mkLib = name: mkLib = name:
stdenv.mkDerivation stdenv.mkDerivation {
{
pname = "kicad-${name}"; pname = "kicad-${name}";
version = "${version}"; version = "${version}";
src = fetchFromGitHub ( src = fetchFromGitHub (
@ -26,7 +25,14 @@ let
} // (libSources.${name} or { }) } // (libSources.${name} or { })
); );
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
meta.license = licenses.cc-by-sa-40;
meta = rec {
license = licenses.cc-by-sa-40;
platforms = stdenv.lib.platforms.all;
# the 3d models are a ~1 GiB download and occupy ~5 GiB in store.
# this would exceed the hydra output limit
hydraPlatforms = if (name == "packages3d" ) then [ ] else platforms;
};
}; };
in in
{ {
@ -56,6 +62,9 @@ in
); );
buildInputs = [ gettext ]; buildInputs = [ gettext ];
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
meta.license = licenses.gpl2; # https://github.com/KiCad/kicad-i18n/issues/3 meta = {
license = licenses.gpl2; # https://github.com/KiCad/kicad-i18n/issues/3
platforms = stdenv.lib.platforms.all;
};
}; };
} }

View File

@ -24894,9 +24894,16 @@ in
fped = callPackage ../applications/science/electronics/fped { }; fped = callPackage ../applications/science/electronics/fped { };
# this is a wrapper for kicad.base and kicad.libraries
kicad = callPackage ../applications/science/electronics/kicad { }; kicad = callPackage ../applications/science/electronics/kicad { };
kicad-small = kicad.override { pname = "kicad-small"; with3d = false; }; kicad-small = kicad.override { pname = "kicad-small"; with3d = false; };
kicad-unstable = kicad.override { pname = "kicad-unstable"; debug = true; }; kicad-unstable = kicad.override { pname = "kicad-unstable"; stable = false; };
# mostly here so the kicad-unstable components (except packages3d) get built
kicad-unstable-small = kicad.override {
pname = "kicad-unstable-small";
stable = false;
with3d = false;
};
librepcb = libsForQt5.callPackage ../applications/science/electronics/librepcb { }; librepcb = libsForQt5.callPackage ../applications/science/electronics/librepcb { };