(define-module (snamellit certs) #:use-module (gnu packages base) #:use-module (gnu packages certs) #:use-module (gnu packages tls) #:use-module (guix build-system copy) #:use-module (guix packages) #:use-module (guix gexp) #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:) #:use-module (nonguix build-system binary)) (define-public snamellit-ca (package (name "snamellit-ca") (version "1.0") (source (local-file "Snamellit_CA.pem")) (build-system copy-build-system) (outputs '("out")) (native-inputs (list certdata2pem openssl)) (inputs '()) (propagated-inputs '()) (arguments (list #:modules '((guix build copy-build-system) (guix build utils) (rnrs io ports) (srfi srfi-26)) #:phases #~(modify-phases (map (cut assq <> %standard-phases) '(set-paths install-locale unpack)) (add-after 'unpack 'install (lambda _ (let ((certsdir (string-append #$output "/etc/ssl/certs/"))) ;; Copy .pem files into the output. (for-each (cut install-file <> certsdir) (find-files "." ".*\\.pem$")) (invoke "openssl" "rehash" certsdir))))))) (synopsis "Snamellit CA Root Certificate") (description "Root Certificate of the Snamellit CA") (home-page "https://www.snamellit.com/") (license license:asl2.0))) snamellit-ca