X-Git-Url: https://git.hcoop.net/jackhill/guix/guix.git/blobdiff_plain/bbdf2761f595da7830570fb93dca6aaca1815e90..81382e3f6d4eb0261bf513a16be58d8d0b7373f2:/gnu/packages/build-tools.scm diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm index a09b3b3fb4..71b1756d3b 100644 --- a/gnu/packages/build-tools.scm +++ b/gnu/packages/build-tools.scm @@ -1,7 +1,12 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2017 Ricardo Wurmus +;;; Copyright © 2017, 2018 Ricardo Wurmus ;;; Copyright © 2017 Corentin Bocquillon ;;; Copyright © 2017, 2018 Tobias Geerinckx-Rice +;;; Copyright © 2018 Fis Trivial +;;; Copyright © 2018 Tomáš Čech +;;; Copyright © 2018 Marius Bakke +;;; Copyright © 2018 Alex Vong +;;; Copyright © 2019 Brett Gilio ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,9 +28,14 @@ #:use-module (guix utils) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix build-system cmake) #:use-module (gnu packages) #:use-module (gnu packages compression) + #:use-module (gnu packages lua) #:use-module (gnu packages python) + #:use-module (gnu packages python-crypto) + #:use-module (gnu packages python-web) #:use-module (gnu packages ninja) #:use-module (guix build-system gnu) #:use-module (guix build-system python)) @@ -33,33 +43,30 @@ (define-public bam (package (name "bam") - (version "0.4.0") + (version "0.5.1") (source (origin - (method url-fetch) - (uri (string-append "http://github.com/downloads/matricks/" - "bam/bam-" version ".tar.bz2")) + ;; do not use auto-generated tarballs + (method git-fetch) + (uri (git-reference + (url "https://github.com/matricks/bam.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 (base32 - "0z90wvyd4nfl7mybdrv9dsd4caaikc6fxw801b72gqi1m9q0c0sn")))) + "13br735ig7lygvzyfd15fc2rdygrqm503j6xj5xkrl1r7w2wipq6")))) (build-system gnu-build-system) (arguments - `(#:phases + `(#:make-flags `("CC=gcc" + ,(string-append "INSTALL_PREFIX=" + (assoc-ref %outputs "out"))) + #:test-target "test" + #:phases (modify-phases %standard-phases - (delete 'configure) - (replace 'build - (lambda _ - (zero? (system* "bash" "make_unix.sh")))) - (replace 'check - (lambda _ - (zero? (system* "python" "scripts/test.py")))) - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) - (mkdir-p bin) - (install-file "bam" bin) - #t)))))) + (delete 'configure)))) (native-inputs `(("python" ,python-2))) + (inputs + `(("lua" ,lua))) (home-page "https://matricks.github.io/bam/") (synopsis "Fast and flexible build system") (description "Bam is a fast and flexible build system. Bam uses Lua to @@ -68,10 +75,92 @@ from scons. While scons focuses on being 100% correct when building, bam makes a few sacrifices to acquire fast full and incremental build times.") (license license:bsd-3))) +(define-public bear + (package + (name "bear") + (version "2.3.13") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rizsotto/Bear") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0imvvs22gyr1v6ydgp5yn2nq8fb8llmz0ra1m733ikjaczl3jm7z")))) + (build-system cmake-build-system) + (inputs + `(("python" ,python-wrapper))) + (home-page "https://github.com/rizsotto/Bear") + (synopsis "Tool for generating a compilation database") + (description "A JSON compilation database is used in the Clang project to +provide information on how a given compilation unit is processed. With this, +it is easy to re-run the compilation with alternate programs. Bear is used to +generate such a compilation database.") + (license license:gpl3+))) + +(define-public gn + (let ((commit "1ab6fa2cab7ec64840db720a56018ca8939329f9") + (revision "1530")) ;as returned by `git describe`, used below + (package + (name "gn") + (version (git-version "0.0" revision commit)) + (home-page "https://gn.googlesource.com/gn") + (source (origin + (method git-fetch) + (uri (git-reference (url home-page) (commit commit))) + (sha256 + (base32 + "06h974d1lag3wwsz6s5asmpv0njmf671ag4la2fpnbh494m97lfk")) + (file-name (git-file-name name version)))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;FIXME: How to run? + #:phases (modify-phases %standard-phases + (add-before 'configure 'set-build-environment + (lambda _ + (setenv "CC" "gcc") (setenv "CXX" "g++") + (setenv "AR" "ar") + (setenv "LDFLAGS" "-pthread") + #t)) + (replace 'configure + (lambda _ + (invoke "python" "build/gen.py" + "--no-last-commit-position"))) + (add-after 'configure 'create-last-commit-position + (lambda _ + ;; Create "last_commit_position.h" to avoid a dependency + ;; on 'git' (and the checkout..). + (call-with-output-file "out/last_commit_position.h" + (lambda (port) + (format port + "#define LAST_COMMIT_POSITION \"~a (~a)\"\n" + ,revision ,(string-take commit 8)) + #t)))) + (replace 'build + (lambda _ + (invoke "ninja" "-C" "out" "gn" + "-j" (number->string (parallel-job-count))))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (install-file "out/gn" (string-append out "/bin")) + #t)))))) + (native-inputs + `(("ninja" ,ninja) + ("python" ,python-2))) + (synopsis "Generate Ninja build files") + (description + "GN is a tool that collects information about a project from @file{.gn} +files and generates build instructions for the Ninja build system.") + ;; GN is distributed as BSD-3, but bundles some files from ICU using the + ;; X11 license. + (license (list license:bsd-3 license:x11))))) + (define-public meson (package (name "meson") - (version "0.45.1") + (version "0.50.0") (source (origin (method url-fetch) (uri (string-append "https://github.com/mesonbuild/meson/" @@ -79,7 +168,7 @@ makes a few sacrifices to acquire fast full and incremental build times.") version ".tar.gz")) (sha256 (base32 - "1yqa4337nb8w92bvr91rsxmn0xkf7pmdybq9ljvnqmdvn7dv02sd")))) + "07q2wz23wjfk8z66mli1cc9as0ycjp5f39fd4awny82qv8nw86ra")))) (build-system python-build-system) (arguments `(;; FIXME: Tests require many additional inputs, a fix for the RUNPATH @@ -147,3 +236,43 @@ scripted definition of a software project and outputs @file{Makefile}s or other lower-level build files.") (home-page "https://premake.github.io") (license license:bsd-3))) + +(define-public osc + (package + (name "osc") + (version "0.162.1") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/openSUSE/" name + "/archive/" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 "0b4kpm96ns4smqyfjysbk2p78d36x44xprpna8zz85q1y5xn57aj")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2 ; Module is python2 only. + #:phases + (modify-phases %standard-phases + (add-after 'install 'fix-filename-and-remove-unused + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") "/bin/"))) + ;; Main osc tool is renamed in spec file, not setup.py, let's + ;; do that too. + (rename-file + (string-append bin "osc-wrapper.py") + (string-append bin "osc")) + ;; Remove unused and broken script. + (delete-file (string-append bin "osc_hotshot.py")) + #t)))))) + (inputs + `(("python2-m2crypto" ,python2-m2crypto) + ("python2-pycurl" ,python2-pycurl) + ("python2-urlgrabber" ,python2-urlgrabber))) + (home-page "https://github.com/openSUSE/osc") + (synopsis "Open Build Service command line tool") + (description "@command{osc} is a command line interface to the Open Build +Service. It allows you to checkout, commit, perform reviews etc. The vast +majority of the OBS functionality is available via commands and the rest can +be reached via direct API calls.") + (license license:gpl2+)))