aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2020, 2021 Marius Bakke <marius@gnu.org>
;;; Copyright © 2023 Clément Lassieur <clement@lassieur.org>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu build icecat-extension)
  #:use-module (guix gexp)
  #:use-module (guix packages)
  #:use-module (guix build-system trivial)
  #:export (make-icecat-extension))

(define* (make-icecat-extension pkg #:optional (pkg-output "out"))
  "Create an Icecat extension from package PKG and return a package that,
when installed, will make the extension contained in PKG available as an
Icecat browser extension.  PKG-OUTPUT specifies which output of PKG to use."
  (package
    (inherit pkg)
    (location (package-location pkg))
    (name (string-append (package-name pkg) "-icecat"))
    (native-inputs '())
    (inputs '())
    (propagated-inputs (package-propagated-inputs pkg))
    (outputs '("out"))
    (build-system trivial-build-system)
    (arguments
     (list
      #:modules '((guix build utils))
      #:builder
      #~(begin
          (use-modules (guix build utils))
          (let* ((addon-id #$(assq-ref (package-properties pkg) 'addon-id))
                 (moz-app-id "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}")
                 (search-dir (string-append #$output "/lib/icecat/extensions/"
                                            moz-app-id)))
            ;; Icecat's iterates over `search-dir` for directories.  If a
            ;; directory's name is not a valid add-on ID, it is ignored.  See
            ;; `DirectoryLocation::readAddons()` in XPIProvider.jsm.

            ;; This directory has to be a symlink, because Icecat's
            ;; `_readLinkFile(aFile)` calls `normalize()` only if `aFile` is a
            ;; symlink.

            ;; Normalizing is required because Icecat compares the add-on path
            ;; against its local database to know if there is an extension
            ;; update.  We want the add-on path to be the package store path,
            ;; so that a path change is detected every time the package is
            ;; updated.  See `updateExistingAddon()` in XPIDatabase.jsm, with
            ;; our patch `icecat-compare-paths.patch`.

            ;; We don't want the add-on path to be the profile store path,
            ;; which would change too often.  We don't want the add-on path to
            ;; be hard-coded either because it would never change (but it
            ;; wouldn't make sense anyway).

            (mkdir-p search-dir)
            (symlink (in-vicinity (ungexp pkg pkg-output) addon-id)
                     (in-vicinity search-dir addon-id))))))))
ant by the manually provided rpath. [description]: Move a word and add some commas to improve the readability. Typeset a program name in @samp{}. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Paul A. Patience 2022-06-08gnu: ngspice: Build with readline support....Fixes <https://issues.guix.gnu.org/>. * gnu/packages/engineering.scm (ngspice) [configure-flags]: Add '--with-readline=yes'. Reported-by: Christopher Howard <christopher@librehacker.com> Maxim Cournoyer 2022-05-31gnu: Remove python2-capstone....* gnu/packages/engineering.scm (python2-capstone): Delete variable. Maxim Cournoyer 2022-05-22gnu: libngspice: Update to 37....* gnu/packages/engineering.scm (libngspice): Update to 37. [arguments]: Remove old "--with-readline=no" work-around from #:configure-flags. Tobias Geerinckx-Rice 2022-05-22gnu: asco: Use SEARCH-INPUT-FILE....* gnu/packages/engineering.scm (asco)[arguments]: Use SEARCH-INPUT-FILE. Tobias Geerinckx-Rice 2022-05-22gnu: asco: Update to 0.4.11....* gnu/packages/engineering.scm (asco): Update to 0.4.11. [arguments]: Don't explicitly return #t from phases. Tobias Geerinckx-Rice 2022-05-18gnu: freecad: Fix build....* gnu/packages/engineering.scm (freecad)[inputs]: Add fontconfig. Guillaume Le Vaillant 2022-05-13gnu: poke: Update to 2.3....* gnu/packages/engineering.scm (poke): Update to 2.3. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Greg Hogan 2022-05-09gnu: kicad: Update to 6.0.5....* gnu/packages/engineering.scm (kicad): Update to 6.0.5. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Peter Polidoro 2022-05-02gnu: Add xschem....* gnu/packages/engineering.scm (xschem): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Konstantinos Agiannis 2022-04-12gnu: Add librseq....* gnu/packages/engineering.scm (librseq): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Olivier Dion 2022-04-07gnu: Add cura....* gnu/packages/engineering.scm (cura): New variable. Co-authored-by: Guillaume Le Vaillant <glv@posteo.net> Malte Frank Gerdes 2022-04-07gnu: Add python-pynest2d....* gnu/packages/engineering.scm (python-pynest2d): New variable. Guillaume Le Vaillant 2022-04-07gnu: Add libnest2d-for-cura....* gnu/packages/engineering.scm (libnest2d-for-cura): New variable. Guillaume Le Vaillant 2022-04-07gnu: Add libsavitar....* gnu/packages/engineering.scm (libsavitar): New variable. Co-authored-by: Guillaume Le Vaillant <glv@posteo.net> Malte Frank Gerdes 2022-04-07gnu: Add libcharon....* gnu/packages/engineering.scm (libcharon): New variable. Co-authored-by: Guillaume Le Vaillant <glv@posteo.net> Malte Frank Gerdes 2022-04-07gnu: Add uranium....* gnu/packages/engineering.scm (uranium): New variable. Co-authored-by: Guillaume Le Vaillant <glv@posteo.net> Malte Frank Gerdes 2022-04-07gnu: Add cura-binary-data....* gnu/packages/engineering.scm (cura-binary-data): New variable. Co-authored-by: Guillaume Le Vaillant <glv@posteo.net> Malte Frank Gerdes 2022-04-07gnu: Add cura-engine....* gnu/packages/engineering.scm (cura-engine): New variable. Co-authored-by: Guillaume Le Vaillant <glv@posteo.net> Malte Frank Gerdes 2022-04-07gnu: Add libarcus....* gnu/packages/engineering.scm (libarcus): New variable. Co-authored-by: Guillaume Le Vaillant <glv@posteo.net> Malte Frank Gerdes 2022-04-07gnu: kicad: Update to 6.0.4....* gnu/packages/engineering.scm (kicad, kicad-doc, kicad-symbols, kicad-footprints, kicad-packages3d, kicad-templates): Update to 6.0.4. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Peter Polidoro 2022-03-25gnu: prusa-slicer: Update to 2.4.1....* gnu/packages/engineering.scm (prusa-slicer): Update to 2.4.1. Guillaume Le Vaillant 2022-03-18gnu: capstone: Update to 4.0.2....* gnu/packages/engineering.scm (capstone): Update to 4.0.2. [source]: Fix indentation and git URL. [phases]: Strip trailing #t. [home]: Update URL. Co-authored-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Olivier Dion 2022-02-18gnu: freecad: Use same version of tbb as dependencies....Fixes <https://issues.guix.gnu.org/54011>. * gnu/packages/engineering.scm (freecad)[inputs]: Replace tbb by tbb-2020. Guillaume Le Vaillant 2022-02-14gnu: freecad: Update to 0.19.3-0.09a05a9....* gnu/packages/engineering.scm (freecad): Update to 0.19.3-0.09a05a9. [source]: Remove patches. [arguments]: Remove unneeded variables for pyside2 and shiboken2 from 'configure-flags'. * gnu/packages/patches/freecad-boost-serialization.patch: Remove file. * gnu/packages/patches/freecad-vtk9.patch: Remove file. * gnu/locak.mk (dist_patch_DATA): Remove "freecad-boost-serialization.patch" and "freecad-vtk9.patch". Guillaume Le Vaillant 2022-02-13gnu: libngspice: Update to 36....* gnu/packages/engineering.scm (libngspice, ngspice): Update to 36. (libngspice)[inputs]: Remove labels. Vinicius Monego 2022-02-13gnu: libredwg: Update to 0.12.5....* gnu/packages/engineering.scm (libredwg): Update to 0.12.5. [native-inputs]: Remove labels. Vinicius Monego 2022-02-11gnu: Remove kicad-i18n....* gnu/packages/engineering.scm (kicad-i18n): Remove variable. i18n is handled directly now in kicad@6.0.0 package source tree. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Petr Hodina 2022-02-11gnu: kicad: Update to 6.0.1....* gnu/packages/engineering.scm (kicad): Update to 6.0.1. Applied guix style command. [native-inputs]: Remove kicad-i18n. Use new syntax. [inputs]: Add bash-minimal, gtk+ and use opencascade-occt instead of opencascade-oce. Use new syntax. [arguments]: Remove phase install-translations. (kicad-doc): Update to 6.0.1. [native-inputs]: Add ruby-asciidoctor. Simplify inputs. (kicad-symbols, kicad-footprints, kicad-packages3d, kicad-templates): Update to 6.0.1. Signed-off-by: Guillaume Le Vaillant <glv@posteo.net> Petr Hodina 2022-02-08gnu: poke: Update to 2.1....* gnu/packages/engineering.scm (poke): Update to 2.1. Efraim Flashner 2022-02-02gnu: Add wireviz....* gnu/packages/engineering.scm (wireviz): New variable. Signed-off-by: 宋文武 <iyzsong@member.fsf.org> Evgeny Pisemsky 2022-02-01gnu: librecad: Fix build with boost 1.76....Fixes <https://issues.guix.gnu.org/53694>. * gnu/packages/patches/librecad-support-for-boost-1.76.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/engineering.scm (librecad)[source]: Use it. Guillaume Le Vaillant 2022-01-31gnu: poke: Update to 2.0....* gnu/packages/engineering.scm (poke): Update to 2.0. Efraim Flashner 2022-01-25gnu: FreeCAD: Replace QtWebKit with QtWebEngine....See <https://issues.guix.gnu.org/53289> for more information about this change. * gnu/packages/engineering.scm (freecad)[inputs]: Remove QTWEBKIT. Add QTDECLARATIVE, QTWEBCHANNEL, and QTWEBENGINE. Leo Famulari 2022-01-24gnu: FreeCAD: Update to 0.19.3....* gnu/packages/engineering.scm (freecad): Update to 0.19.3. Leo Famulari