@ -2,8 +2,7 @@
, fetchFromGitLab
, gnome
, dconf
, wxGTK30
, wxGTK31
, wxGTK31-gtk3
, makeWrapper
, gsettings-desktop-schemas
, hicolor-icon-theme
@ -15,7 +14,6 @@
, pname ? " k i c a d "
, stable ? true
, oceSupport ? false
, withOCE ? false
, withOCCT ? false
, withOCC ? true
, ngspiceSupport ? false
@ -28,7 +26,8 @@
, sanitizeAddress ? false
, sanitizeThreads ? false
, with3d ? true
, withI18n ? true
, withI18n ? false
, withPCM ? true # Plugin and Content Manager
, srcs ? { }
} :
@ -71,8 +70,6 @@
assert withNgspice -> libngspice != null ;
assert lib . assertMsg ( ! ngspiceSupport )
" ` n s p i c e S u p p o r t ` w a s r e n a m e d t o ` w i t h N g s p i c e ` f o r t h e s a k e o f c o n s i s t e n c y w i t h o t h e r k i c a d n i x a r g u m e n t s . " ;
assert lib . assertMsg ( ! oceSupport )
" ` o c e S u p p o r t ` w a s r e n a m e d t o ` w i t h O C E ` f o r t h e s a k e o f c o n s i s t e n c y w i t h o t h e r k i c a d n i x a r g u m e n t s . " ;
assert lib . assertMsg ( ! scriptingSupport )
" ` s c r i p t i n g S u p p o r t ` w a s r e n a m e d t o ` w i t h S c r i p t i n g ` f o r t h e s a k e o f c o n s i s t e n c y w i t h o t h e r k i c a d n i x a r g u m e n t s . " ;
assert lib . assertMsg ( ! withOCCT )
@ -132,25 +129,9 @@ let
if srcOverridep " l i b V e r s i o n " then srcs . libVersion
else versionsImport . ${ baseName } . libVersion . version ;
wxGTK =
if ( stable )
# wxGTK3x may default to withGtk2 = false, see #73145
then
wxGTK30 . override
{
withGtk2 = false ;
}
# wxGTK31 currently introduces an issue with opening the python interpreter in pcbnew
# but brings high DPI support?
else
wxGTK31 . override {
withGtk2 = false ;
} ;
wxGTK = wxGTK31-gtk3 ;
python = python3 ;
wxPython = if ( stable )
then python . pkgs . wxPython_4_0
else python . pkgs . wxPython_4_1 ;
wxPython = python . pkgs . wxPython_4_1 ;
inherit ( lib ) concatStringsSep flatten optionalString optionals ;
in
@ -164,7 +145,7 @@ stdenv.mkDerivation rec {
inherit kicadSrc kicadVersion ;
inherit ( passthru ) i18n ;
inherit wxGTK python wxPython ;
inherit withI18n with OCC withOCE withNgspice withScripting ;
inherit withOCC withNgspice withScripting withI18n withPCM ;
inherit debug sanitizeAddress sanitizeThreads ;
} ;
@ -197,27 +178,14 @@ stdenv.mkDerivation rec {
" - - p r e f i x G I O _ E X T R A _ M O D U L E S : ${ dconf } / l i b / g i o / m o d u l e s "
# required to open a bug report link in firefox-wayland
" - - s e t - d e f a u l t M O Z _ D B U S _ R E M O T E 1 "
]
++ optionals ( stable )
[
" - - s e t - d e f a u l t K I S Y S M O D ${ footprints } / s h a r e / k i c a d / m o d u l e s "
" - - s e t - d e f a u l t K I C A D _ S Y M B O L _ D I R ${ symbols } / s h a r e / k i c a d / l i b r a r y "
" - - s e t - d e f a u l t K I C A D _ T E M P L A T E _ D I R ${ templates } / s h a r e / k i c a d / t e m p l a t e "
" - - p r e f i x K I C A D _ T E M P L A T E _ D I R : ${ symbols } / s h a r e / k i c a d / t e m p l a t e "
" - - p r e f i x K I C A D _ T E M P L A T E _ D I R : ${ footprints } / s h a r e / k i c a d / t e m p l a t e "
]
++ optionals ( stable && with3d ) [ " - - s e t - d e f a u l t K I S Y S 3 D M O D ${ packages3d } / s h a r e / k i c a d / m o d u l e s / p a c k a g e s 3 d " ]
++ optionals ( ! stable )
[
" - - s e t - d e f a u l t K I C A D 6 _ F O O T P R I N T _ D I R ${ footprints } / s h a r e / k i c a d / f o o t p r i n t s "
" - - s e t - d e f a u l t K I C A D 6 _ S Y M B O L _ D I R ${ symbols } / s h a r e / k i c a d / s y m b o l s "
" - - s e t - d e f a u l t K I C A D 6 _ T E M P L A T E _ D I R ${ templates } / s h a r e / k i c a d / t e m p l a t e "
" - - p r e f i x K I C A D 6 _ T E M P L A T E _ D I R : ${ symbols } / s h a r e / k i c a d / t e m p l a t e "
" - - p r e f i x K I C A D 6 _ T E M P L A T E _ D I R : ${ footprints } / s h a r e / k i c a d / t e m p l a t e "
]
++ optionals ( ! stable && with3d )
++ optionals ( with3d )
[
" - - s e t - d e f a u l t K I S Y S 3 D M O D ${ packages3d } / s h a r e / k i c a d / 3 d m o d e l s "
" - - s e t - d e f a u l t K I C A D 6 _ 3 D M O D E L _ D I R ${ packages3d } / s h a r e / k i c a d / 3 d m o d e l s "
]
++ optionals ( withNgspice ) [ " - - p r e f i x L D _ L I B R A R Y _ P A T H : ${ libngspice } / l i b " ]
@ -259,9 +227,6 @@ stdenv.mkDerivation rec {
ln - s $ { base } /share/applications $ out/share/applications
ln - s $ { base } /share/icons $ out/share/icons
ln - s $ { base } /share/mime $ out/share/mime
'' + o p t i o n a l S t r i n g ( s t a b l e ) ''
ln - s $ { base } /share/appdata $ out/share/appdata
'' + o p t i o n a l S t r i n g ( ! s t a b l e ) ''
ln - s $ { base } /share/metainfo $ out/share/metainfo
'' ;