From 015a65f27f46bbdad3e07dbabc5154609ae6ec2d Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Thu, 11 Nov 2021 19:21:44 +0100 Subject: [PATCH 2/2] gnu: Add sourcetrail. * gnu/packages/qt.scm (sourcetrail): New variable. diff --git a/gnu/packages/qt.scm b/gnu/packages/qt.scm index 30bf429897..540959bbbc 100644 --- a/gnu/packages/qt.scm +++ b/gnu/packages/qt.scm @@ -62,6 +62,7 @@ (define-module (gnu packages qt) #:use-module (gnu packages base) #:use-module (gnu packages bison) #:use-module (gnu packages check) + #:use-module (gnu packages boost) #:use-module (gnu packages cmake) #:use-module (gnu packages compression) #:use-module (gnu packages cups) @@ -4261,6 +4262,46 @@ (define-public qhexedit data.") (license license:lgpl2.1))) +(define-public sourcetrail +(package + (name "sourcetrail") + (version "2021.1.30") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/CoatiSoftware/Sourcetrail") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0h0q2bfa6dv8hmc15rzj48bna1krzjwlcjm25dffbsi81xjcazb5")))) + (build-system cmake-build-system) + (arguments + (list #:configure-flags #~(list "-DBoost_USE_STATIC_LIBS=OFF" (string-append + "-DBOOST_ROOT=" #$(this-package-input "boost") "/lib")) + #:phases + #~(modify-phases %standard-phases + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out #$output) + (prefix (string-append out "/opt/sourcetrail")) + (build (getcwd)) + (share (string-append prefix "/share"))) + (mkdir-p (string-append out "/bin")) + (install-file (string-append build "/app/Sourcetrail") (string-append + out "/bin")) + (install-file (string-append build + "/app/sourcetrail_indexer") (string-append + out "/bin")))))))) + (native-inputs (list pkg-config)) + (inputs (list boost-for-sourcetrail + qtbase-5 + qtsvg-5)) + (synopsis "Interactive source explorer") + (description "Offline source explorer that helps you get productive on unfamiliar source code with optional IDE integration.") + (home-page "https://www.sourcetrail.com") + (license license:gpl3))) + (define-public soqt (let ((commit-ref "fb8f655632bb9c9c60e0ff9fa69a5ba22d3ff99d") (revision "1")) -- 2.38.1