guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 0/3] gnu: Add kicad.


From: Theodoros Foradis
Subject: [PATCH v2 0/3] gnu: Add kicad.
Date: Tue, 25 Oct 2016 19:09:04 +0300

Leo Famulari writes:

> On Tue, Oct 25, 2016 at 12:16:58AM +0300, Theodoros Foradis wrote:
>> * gnu/packages/engineering.scm (kicad): New variable.
>
> I'm very happy to see this package almost there!
>
>> +;; We use kicad from a git commit, because support for boost 1.61.0
>> +;; has been recently added.
>> +(define-public kicad
>> +  (let ((commit "4ee344e150bfaf3a6f3f7bf935fb96ae07c423fa")
>> +        (hash "0kf6r92nps0658i9n3p9vp5dzbssmc22lvjv5flyvnlf83l63s4n"))
>
> I'd put the source hash in the "normal" place unless it's used later in
> the package.

>

fixed

>> +    (package
>> +      (name "kicad")
>> +      (version (string-append "4.0-" (string-take commit 7)))
>

fixed

> Please make the version string with a revision number, as shown in the
> manual section 7.6.3 Version Numbers. Otherwise, if we update our 4.0
> Git-based package, users might not be able to upgrade with `guix package
> -u`, since the Git hash not does not increase or decrease reliably.
>
>> +      (source
>> +       (origin
>> +         (method git-fetch)
>> +         (uri (git-reference
>> +               (url "https://git.launchpad.net/kicad.git";)
>> +               (commit commit)))
>> +         (sha256
>> +          (base32 hash))
>> +         (file-name (string-append name "-" version "-checkout"))))
>> +      (build-system cmake-build-system)
>> +      (arguments
>> +       `(#:out-of-source? #t
>> +         #:tests? #f ; no tests
>> +         #:configure-flags
>> +           (list "-DKICAD_STABLE_VERSION=ON"
>> +                 "-DKICAD_REPO_NAME=stable"
>> +                 "-DKICAD_BUILD_VERSION=4.0"
>> +                 "-DCMAKE_BUILD_TYPE=Release"
>> +                 "-DKICAD_SKIP_BOOST=ON"
>
> Can you add a comment explaining this flag?
>

comment added

>> +                 "-DKICAD_SCRIPTING=ON"
>> +                 "-DKICAD_SCRIPTING_MODULES=ON"
>> +                 "-DKICAD_SCRIPTING_WXPYTHON=ON"
>> +                 ;; Has to be set explicitely, as we don't have the wxPython
>> +                 ;; headers in the wxwidgets store item, but in wxPython.
>> +                 (string-append "-DCMAKE_CXX_FLAGS=-I"
>> +                                (assoc-ref %build-inputs "wxpython")
>> +                                "/include/wx-3.0")
>> +                 "-DCMAKE_BUILD_WITH_INSTALL_RPATH=TRUE"
>> +                 "-DBUILD_GITHUB_PLUGIN=OFF")
>> +           #:phases
>> +             (modify-phases %standard-phases
>> +               (add-after 'install 'wrap-program ;;Ensure correct python at 
>> runtime
>> +                          (lambda* (#:key inputs outputs #:allow-other-keys)
>> +                            (let* ((out (assoc-ref outputs "out"))
>> +                                   (python (assoc-ref inputs "python"))
>> +                                   (file (string-append out "/bin/kicad"))
>> +                                   (path (string-append
>> +                                          out
>> +                                          "/lib/python2.7/site-packages:"
>> +                                          (getenv "PYTHONPATH"))))
>> +                              (wrap-program file
>> +                                `("PYTHONPATH" ":" prefix (,path))
>> +                                `("PATH" ":" prefix
>> +                                  (,(string-append python "/bin:")))))
>> +                            #t)))))
>> +      (native-inputs
>> +       `(("boost" ,boost)
>> +         ("gettext" ,gnu-gettext)
>> +         ("pkg-config" ,pkg-config)
>> +         ("swig" ,swig)
>> +         ("zlib" ,zlib)))
>> +      (inputs
>> +       `(("cairo" ,cairo)
>> +         ("curl" ,curl)
>> +         ("desktop-file-utils" ,desktop-file-utils)
>> +         ("glew" ,glew)
>> +         ("glm" ,glm)
>> +         ("hicolor-icon-theme" ,hicolor-icon-theme)
>> +         ("libsm" ,libsm)
>> +         ("mesa" ,mesa)
>> +         ("openssl" ,openssl)
>> +         ("python" ,python-2)
>> +         ("wxwidgets" ,wxwidgets-gtk2)
>> +         ("wxpython" ,python2-wxpython)))
>
> Can you check what packages the output refers to, using `guix gc
> --references $(./pre-inst-env guix build kicad)`?
>
> Some of the 'inputs' are not referenced, and so they will be garbage
> collected when the user does `guix gc`, breaking the installed package.
> I'm not sure exactly how to fix that here. Does anyone have advice?

Using `guix gc --references $(./pre-inst-env guix build kicad)` gives me:
/gnu/store/15108s447dw871hipsy4d5ymj8l4pg9s-wxwidgets-gtk2-3.0.2
/gnu/store/1xfc2pwr7qfjib9kfy3n2hjq56z7jyjx-python-2.7.11
/gnu/store/7nvkh8bb24nlw5ayyz5z292vxqsm38ci-glu-9.0.0
/gnu/store/9nifwk709wajpyfwa0jzaa3p6mf10vxs-gcc-4.9.3-lib
/gnu/store/fjqm9am7np8dkm30kcgf7d84w4walhv5-glew-2.0.0
/gnu/store/gzcf89jjza5m836sycvi8rvqrjx5dfgc-cairo-1.14.6
/gnu/store/lwa2zd7hcii3b870lp4qm44mzckqnrik-python2-wxpython-3.0.2.0
/gnu/store/m9vxvhdj691bq1f85lpflvnhcvrdilih-glibc-2.23
/gnu/store/mcnhg4zdfvp50xwlyiq7c1731bjnrjb8-kicad-4.0-1.4ee344e
/gnu/store/r837zajjc1q8z9hph4b6860a9c05blyy-openssl-1.0.2j
/gnu/store/wzbjwqgdl2cn7az984349x7pqh6pkw1y-boost-1.61.0
/gnu/store/x98d057wl2krpja1bvwpi9qbsxjf8n71-glm-0.9.6.3
/gnu/store/xzx126zvlvy3jaj020sdkq9jpxbf04ap-mesa-11.0.9
/gnu/store/ykzwykkvr2c80rw4l1qh3mvfdkl7jibi-bash-4.3.42

Maybe the other inputs are not runtime dependencies? Not sure of this one.

I also got rid of replacing the build phase, as Hartmut Goebel
suggested, for compatibility with the upcoming python build system.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]