aboutsummaryrefslogtreecommitdiff
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016, 2021 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2017, 2020-2022 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; 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 packages nettle)
  #:use-module (guix utils)
  #:use-module (guix licenses)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix build-system gnu)
  #:use-module (gnu packages)
  #:use-module (gnu packages multiprecision)
  #:use-module (gnu packages m4))

(define-public nettle-2
  (package
    (name "nettle")
    (version "2.7.1")
    (source (origin
             (method url-fetch)
             (uri (string-append "mirror://gnu/nettle/nettle-"
                                 version ".tar.gz"))
             (sha256
              (base32
               "0h2vap31yvi1a438d36lg1r1nllfx3y19r4rfxv7slrm6kafnwdw"))))
    (build-system gnu-build-system)
    (arguments
     ;; 'sexp-conv' and other programs need to have their RUNPATH point to
     ;; $libdir, which is not the case by default.  Work around it.
     `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
                                              (assoc-ref %outputs "out")
                                              "/lib"))
       #:phases (modify-phases %standard-phases
                  (add-after 'install 'move-static-libraries
                    (lambda* (#:key outputs #:allow-other-keys)
                      (let ((out (assoc-ref outputs "out"))
                            (slib (string-append (assoc-ref outputs "static")
                                                 "/lib")))
                        (mkdir-p slib)
                        (with-directory-excursion (string-append out "/lib")
                          (for-each (lambda (ar)
                                      (rename-file ar (string-append
                                                       slib "/"
                                                       (basename ar))))
                                    (find-files
                                     "."
                                     ,(if (target-mingw?)
                                          '(lambda (filename _)
                                             (and (string-suffix? ".a" filename)
                                                  (not (string-suffix? ".dll.a" filename))))
                                          "\\.a$"))))
                        #t))))))
    (outputs '("out" "debug" "static"))
    (native-inputs (list m4))
    (propagated-inputs (list gmp))
    (home-page "https://www.lysator.liu.se/~nisse/nettle/")
    (synopsis "C library for low-level cryptographic functionality")
    (description
     "GNU Nettle is a low-level cryptographic library.  It is designed to
fit in easily in almost any context.  It can be easily included in
cryptographic toolkits for object-oriented languages or in applications
themselves.")
    (license gpl2+)))

(define-public nettle
  ;; This version is not API-compatible with version 2.  In particular, lsh
  ;; cannot use it yet.  So keep it separate.
  (package (inherit nettle-2)
    (version "3.9.1")
    (source (origin
              (method url-fetch)
              (uri (string-append "mirror://gnu/nettle/nettle-"
                                  version ".tar.gz"))
              (sha256
               (base32
                "1qvc1iamnvbiss0bx9c98djgn3y60zs59c5wdyyip9qc3fcgzznc"))))
    (arguments
     (substitute-keyword-arguments (package-arguments nettle-2)
       ((#:configure-flags flags)
        ;; Build "fat" binaries where the right implementation is chosen
        ;; at run time based on CPU features (starting from 3.1.)
        `(cons "--enable-fat" ,flags))))))
9): New variable. (rust-cairo-rs-0.8): inherit from above. Nicolas Goaziou 2020-12-05gnu: Add rust-gdk-sys-0.10....* gnu/packages/crates-gtk.scm (rust-gdk-sys-0.10): New variable. Nicolas Goaziou 2020-12-05gnu: Add rust-cairo-sys-rs-0.10....* gnu/packages/crates-gtk.scm (rust-cairo-sys-rs-0.10): New variable. (rust-cairo-sys-rs-0.9): inherit from above. Nicolas Goaziou 2020-12-05gnu: Add rust-atk-0.8....* gnu/packages/crates-gtk.scm (rust-atk-0.8): New variable. Nicolas Goaziou 2020-12-05gnu: Add rust-atk-sys-0.9....* gnu/packages/crates-gtk.scm (rust-atk-sys-0.9): New variable. Nicolas Goaziou 2020-12-05gnu: Add rust-pango-0.9....* gnu/packages/crates-gtk.scm (rust-pango-0.9): New variable. (rust-pango-0.8): inherit from above. Nicolas Goaziou 2020-12-05gnu: Add rust-pango-sys-0.10....* gnu/packages/crates-gtk.scm (rust-pango-sys-0.10): New variable. (rust-pango-sys-0.9): inherit from above. Nicolas Goaziou 2020-12-05gnu: Add rust-glib-0.10....* gnu/packages/crates-gtk.scm (rust-glib-0.10): New variable. (rust-glib-0.8): inherit from the above. Nicolas Goaziou 2020-12-05gnu: Add rust-glib-macros-0.10....* gnu/packages/crates-gtk.scm (rust-glib-macros-0.10): New variable. Nicolas Goaziou 2020-12-05gnu: Add rust-gobject-sys-0.10....* gnu/packages/crates-gtk.scm (rust-gobject-sys-0.10): New variable. Nicolas Goaziou 2020-12-05gnu: Add rust-glib-sys-0.10....* gnu/packages/crates-gtk.scm (rust-glib-sys-0.10): New variable. (rust-glib-sys-0.9): inherit from above. Nicolas Goaziou 2020-12-04gnu: rust-gtk-rs-lgpl-docs-0: Update to 0.1.18....* gnu/packages/crates-gtk.scm (rust-gtk-rs-lgpl-docs-0): Update to 0.1.18. Nicolas Goaziou 2020-10-05gnu: Move graphics crates to crates-graphics.scm....* gnu/packages/crates-graphics.scm: New module. Move rust-andrew-0.2, rust-ansi-colours-1, rust-ansi-term-0.12, rust-ansi-term-0.11, rust-ansi-term-0.10, rust-aom-sys-0.1, rust-ascii-canvas-2, rust-cgl-0.3, rust-cgl-0.2, rust-cgmath-0.17, rust-cglmath-0.16, rust-core-graphics-0.17, rust-core-video-sys-0.1, rust-dav1d-sys-0.3, rust-euclid-0.20, rust-gfx-0.18, rust-gfx-core-0.9, rust-gfx-device-gl-0.16, rust-gfx-gl-0.6, rust-gif-0.10, rust-gl-0.11, rust-gl-generator-0.14, rust-gl-generator-0.13, rust-gl-generator-0.11, rust-gl-generator-0.10, rust-gleam-0.6, rust-glutin-0.22, rust-glutin-0.21, rust-glutin-egl-sys-0.1, rust-glutin-emscripten-sys-0.1, rust-glutin-gles2-sys-0.1, rust-glutin-glx-sys-0.1, rust-glutin-wayland-sys-0.1, rust-image-0.23, rust-image-0.22, rust-image-0.21, rust-image-0.20, rust-jpeg-decoder-0.1, rust-line-drawing-0.7, rust-lyon-geom-0.14, rust-lyon-path-0.14, rust-osmesa-sys-0.1, rust-piston-0.49, rust-piston-float-1.0, rust-piston-gfx-texture-0.40, rust-piston-graphics-api-version-0.2, rust-piston-shaders-graphics2d-0.3, rust-piston-texture-0.8, rust-piston-viewport-1.0, rust-piston-window-0.105, rust-piston2d-gfx-graphics-0.66, rust-pison2d-graphics-0.35, rust-piston-event-loop-0.49, rust-pistoncore-glutin-window-0.63, rust-pistoncore-input-0.28, rust-pistoncore-window-0.44, rust-png-0.16, rust-png-0.15, rust-png-0.14, rust-png-0.12, rust-raw-window-handle-0.3, rust-resize-0.3, rust-rgb-0.8, rust-smithay-client-toolkit-0.6, rust-smithay-client-toolkit-0.4, rust-smithay-clipboard-0.3, rust-tiff-0.5, rust-tiff-0.3, rust-tiff-0.2, rust-wayland-client-0.23, rust-wayland-client-0.21, rust-wayland-commons-0.23, rust-wayland-commons-0.21, rust-wayland-protocols-0.23, rust-wayland-protocols-0.21, rust-wayland-scanner-0.23, rust-wayland-scanner-0.21, rust-wayland-server-0.23, rust-wayland-server-0.21, rust-wayland-sys-0.23, rust-wayland-sys-0.21, rust-winit-0.20, rust-winit-0.19, rust-x11-2, rust-x11-clipboard-0.4, rust-x11-dl-2, rust-y4m-0.5 to here. * gnu/packages/crates-io.scm: ... from here. * gnu/local.mk (GNU_SYSTEM_MODULES): Register new module. * gnu/packages/crates-io.scm, gnu/packages/crates-gtk.scm, gnu/packages/gnome.scm, gnu/packages/rust-apps.scm, gnu/packages/terminals.scm, gnu/packages/video.scm: Adjust for package movement. Efraim Flashner 2020-10-05gnu: Move gtk crates to crates-gtk.scm....* gnu/packages/crates-gtk.scm: New module. Move rust-cairo-rs-0.8, rust-cairo-rs-0.7, rust-cairo-sys-rs-0.9, rust-gdk-pixbuf-0.8, rust-gdk-pixbuf-0.7, rust-gdk-pixbuf-sys-0.9, rust-gio-0.8, rust-gio-0.7, rust-gio-sys-0.9, rust-gir-format-check-0.1, rust-glib-0.9, rust-glib-0.8, rust-glib-sys-0.9, rust-gobject-sys-0.9, rust-gtk-rs-lgpl-docs-0.1, rust-pango-0.8, rust-pango-0.7, rust-pango-sys-0.9, rust-pangocairo-0.9, rust-pangocairo-0.8, rust-pangocairo-sys-0.10 to here... * gnu/packages/crates-io.scm: ... from here. * gnu/local.mk (GNU_SYSTEM_MODULES): Register new module. * gnu/packages/gnome.scm: Adjust for package movement. Efraim Flashner