From 4db1ea8b81cddb753076f342de8c1afe1a8d28e1 Mon Sep 17 00:00:00 2001 From: John Soo Date: Sat, 6 Jul 2019 08:34:24 -0700 Subject: [PATCH 02/10] gnu: Add llvm-toolchain-6. * gnupackages/llvm.scm (llvm-toolchain-6): New variable. --- gnu/packages/llvm.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 9efb4a4841..19d5f63fd6 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2018 Tim Gesthuizen ;;; Copyright © 2018 Pierre Neidhardt ;;; Copyright © 2019 Rutger Helling +;;; Copyright © 2019 John Soo ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,6 +38,7 @@ #:use-module (guix build-system cmake) #:use-module (guix build-system emacs) #:use-module (guix build-system python) + #:use-module (guix build-system trivial) #:use-module (gnu packages) #:use-module (gnu packages gcc) #:use-module (gnu packages bootstrap) ;glibc-dynamic-linker @@ -690,3 +692,36 @@ C/C++/Obj-C code according to a set of style options, see (synopsis "Rename every occurrence of a symbol using clang-rename") (description "This package renames every occurrence of a symbol at point using @code{clang-rename}."))) + +;; PySide2 docs recommend using a bundled version of libclang +;; See https://wiki.qt.io/Qt_for_Python/GettingStarted +;; The source they recommend: https://download.qt.io/development_releases/prebuilt/libclang/ +(define-public llvm-toolchain-6 + (package + (inherit llvm-6) + (name "llvm-toolchain") + (build-system trivial-build-system) + (inputs + `(("clang-6" ,clang-6) + ("llvm-6" ,llvm-6))) + (arguments + `(#:modules ((guix build union) + (guix build utils)) + #:builder + (begin + (use-modules (guix build union) + (ice-9 match) + (srfi srfi-1)) + (union-build + (assoc-ref %outputs "out") + (filter-map + (match-lambda + ((name . dir) + (if (or (string=? name "clang-6") + (string=? name "llvm-6")) + dir + #f))) + %build-inputs)) + #t))) + (license license:ncsa))) + -- 2.23.0