mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-11-05 17:56:46 +01:00
kicad: expose base and libraries attributes
This commit is contained in:
parent
efd676ad34
commit
18a1b153ac
|
@ -2,7 +2,6 @@
|
|||
, libX11, gettext, glew, glm, cairo, curl, openssl, boost, pkgconfig
|
||||
, doxygen, pcre, libpthreadstubs, libXdmcp, fetchpatch, lndir, callPackages
|
||||
|
||||
, pname ? "kicad"
|
||||
, stable ? true
|
||||
, baseName ? "kicad"
|
||||
, versions ? { }
|
||||
|
@ -20,26 +19,26 @@ with lib;
|
|||
let
|
||||
|
||||
versionConfig = versions.${baseName};
|
||||
baseVersion = "${versions.${baseName}.kicadVersion.version}";
|
||||
|
||||
# oce on aarch64 fails a test
|
||||
withOCE = oceSupport && !stdenv.isAarch64;
|
||||
withOCC = (withOCCT && !withOCE) || (oceSupport && stdenv.isAarch64);
|
||||
|
||||
kicad-libraries = callPackages ./libraries.nix versionConfig.libVersion;
|
||||
libraries = callPackages ./libraries.nix versionConfig.libVersion;
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
inherit pname;
|
||||
version = "base-${baseVersion}";
|
||||
i18n = libraries.i18n;
|
||||
|
||||
pname = "kicad-base";
|
||||
version = "${versions.${baseName}.kicadVersion.version}";
|
||||
|
||||
src = fetchFromGitLab (
|
||||
{
|
||||
group = "kicad";
|
||||
owner = "code";
|
||||
repo = "kicad";
|
||||
rev = baseVersion;
|
||||
} // versionConfig.kicadVersion.src
|
||||
);
|
||||
|
||||
|
@ -113,7 +112,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
postInstall = optional (withI18n) ''
|
||||
mkdir -p $out/share
|
||||
lndir ${kicad-libraries.i18n}/share $out/share
|
||||
lndir ${i18n}/share $out/share
|
||||
'';
|
||||
|
||||
meta = {
|
||||
|
|
|
@ -35,17 +35,16 @@ let
|
|||
python = python3;
|
||||
wxPython = python3Packages.wxPython_4_0;
|
||||
|
||||
libraries = callPackages ./libraries.nix versionConfig.libVersion;
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
passthru.libraries = callPackages ./libraries.nix versionConfig.libVersion;
|
||||
base = callPackage ./base.nix {
|
||||
pname = baseName;
|
||||
inherit versions stable baseName;
|
||||
inherit wxGTK python wxPython;
|
||||
inherit debug withI18n withOCCT oceSupport ngspiceSupport scriptingSupport;
|
||||
};
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
inherit pname;
|
||||
version = versions.${baseName}.kicadVersion.version;
|
||||
|
||||
|
@ -63,7 +62,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
# wrapGAppsHook added the equivalent to ${base}/share
|
||||
# though i noticed no difference without it
|
||||
makeWrapperArgs = [
|
||||
makeWrapperArgs = with passthru.libraries; [
|
||||
"--prefix XDG_DATA_DIRS : ${base}/share"
|
||||
"--prefix XDG_DATA_DIRS : ${hicolor-icon-theme}/share"
|
||||
"--prefix XDG_DATA_DIRS : ${gnome3.defaultIconTheme}/share"
|
||||
|
@ -73,13 +72,13 @@ stdenv.mkDerivation rec {
|
|||
"--prefix XDG_DATA_DIRS : ${cups}/share"
|
||||
"--prefix GIO_EXTRA_MODULES : ${gnome3.dconf}/lib/gio/modules"
|
||||
|
||||
"--set KISYSMOD ${libraries.footprints}/share/kicad/modules"
|
||||
"--set KICAD_SYMBOL_DIR ${libraries.symbols}/share/kicad/library"
|
||||
"--set KICAD_TEMPLATE_DIR ${libraries.templates}/share/kicad/template"
|
||||
"--prefix KICAD_TEMPLATE_DIR : ${libraries.symbols}/share/kicad/template"
|
||||
"--prefix KICAD_TEMPLATE_DIR : ${libraries.footprints}/share/kicad/template"
|
||||
"--set KISYSMOD ${footprints}/share/kicad/modules"
|
||||
"--set KICAD_SYMBOL_DIR ${symbols}/share/kicad/library"
|
||||
"--set KICAD_TEMPLATE_DIR ${templates}/share/kicad/template"
|
||||
"--prefix KICAD_TEMPLATE_DIR : ${symbols}/share/kicad/template"
|
||||
"--prefix KICAD_TEMPLATE_DIR : ${footprints}/share/kicad/template"
|
||||
]
|
||||
++ optionals (with3d) [ "--set KISYS3DMOD ${libraries.packages3d}/share/kicad/modules/packages3d" ]
|
||||
++ optionals (with3d) [ "--set KISYS3DMOD ${packages3d}/share/kicad/modules/packages3d" ]
|
||||
++ optionals (ngspiceSupport) [ "--prefix LD_LIBRARY_PATH : ${libngspice}/lib" ]
|
||||
|
||||
# infinisil's workaround for #39493
|
||||
|
|
Loading…
Reference in a new issue