tls.scm
| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> |
| 3 | ;;; |
| 4 | ;;; This file is part of GNU Guix. |
| 5 | ;;; |
| 6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 7 | ;;; under the terms of the GNU General Public License as published by |
| 8 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 9 | ;;; your option) any later version. |
| 10 | ;;; |
| 11 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | ;;; GNU General Public License for more details. |
| 15 | ;;; |
| 16 | ;;; You should have received a copy of the GNU General Public License |
| 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 18 | |
| 19 | (define-module (more packages tls) |
| 20 | #:use-module (guix packages) |
| 21 | #:use-module (guix download) |
| 22 | #:use-module (guix git-download) |
| 23 | #:use-module (guix build-system cmake) |
| 24 | #:use-module ((guix licenses) #:prefix license:) |
| 25 | #:use-module (gnu packages) |
| 26 | #:use-module (gnu packages golang) |
| 27 | #:use-module (gnu packages perl) |
| 28 | #:use-module (gnu packages pkg-config)) |
| 29 | |
| 30 | (define-public boringssl |
| 31 | (package |
| 32 | (name "boringssl") |
| 33 | ;; Latest version at the time of packaging |
| 34 | (version "32e59d2d3264e4e104b355ef73663b8b79ac4093") |
| 35 | (source (origin |
| 36 | (method git-fetch) |
| 37 | (uri (git-reference |
| 38 | (url "https://boringssl.googlesource.com/boringssl") |
| 39 | (commit version))) |
| 40 | (file-name (git-file-name name version)) |
| 41 | (sha256 |
| 42 | (base32 |
| 43 | "0hk90f5svx5zs86syydg3wy4b75m9469byrzj71xsyw6lh6zajjd")))) |
| 44 | (build-system cmake-build-system) |
| 45 | (arguments |
| 46 | `(#:tests? #f; require ninja? |
| 47 | #:configure-flags (list "-DBUILD_SHARED_LIBS=1") |
| 48 | #:validate-runpath? #f; FIXME: this is buggy :/ |
| 49 | #:phases |
| 50 | (modify-phases %standard-phases |
| 51 | (add-before 'build 'change-home |
| 52 | (lambda _ |
| 53 | (setenv "HOME" "/tmp") |
| 54 | #t)) |
| 55 | (replace 'install |
| 56 | (lambda* (#:key outputs #:allow-other-keys) |
| 57 | (let* ((out (assoc-ref outputs "out")) |
| 58 | (lib (string-append out "/lib")) |
| 59 | (include (string-append out "/include"))) |
| 60 | (install-file "ssl/libssl.so" lib) |
| 61 | (install-file "crypto/libcrypto.so" lib) |
| 62 | (copy-recursively "../source/include" include)) |
| 63 | #t))))) |
| 64 | (native-inputs |
| 65 | `(("go" ,go) |
| 66 | ("perl" ,perl) |
| 67 | ("pkg-config" ,pkg-config))) |
| 68 | (home-page "") |
| 69 | (synopsis "") |
| 70 | (description "") |
| 71 | (license license:expat))) |
| 72 |