summaryrefslogtreecommitdiff
path: root/gnu/packages/build-tools.scm
diff options
context:
space:
mode:
authorNicolas Graves <ngraves@ngraves.fr>2025-08-14 10:23:12 +0200
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-08-16 00:25:28 +0100
commite46a5255ff18cfbd7fead2561d3c7ed0e86c1138 (patch)
treef68810b45e150cee4bd433a24b334cdc8ee1c909 /gnu/packages/build-tools.scm
parentbf54c7e2644aa6368cb826b0656352e04051ebfc (diff)
gnu: compiledb: Switch to pyproject.
* gnu/packages/build-tools.scm (compiledb): [source]: Switch to git-fetch. [build-system]: Switch to pyproject-build-system. [arguments]<#:phases>: Improve style, add substitution to fix tests. [native-inputs]: Add python-pytest, python-setuptools, python-wheel. Change-Id: Iaafbd32f7e7622ea95dcff9944cdccee600d80cd Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
Diffstat (limited to 'gnu/packages/build-tools.scm')
-rw-r--r--gnu/packages/build-tools.scm48
1 files changed, 28 insertions, 20 deletions
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 170d32f3e3b..055c1d2cc9c 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -774,28 +774,36 @@ right compilation options.")
(name "compiledb")
(version "0.10.1")
(source
- (origin
- (method url-fetch)
- (uri (pypi-uri "compiledb" version))
- (sha256
- (base32 "0vlngsdxfakyl8b7rnvn8h3l216lhbrrydr04yhy6kd03zflgfq6"))))
- (build-system python-build-system)
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nickdiego/compiledb")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0qricdgqzry7j3rmgwyd43av3c2kxpzkh6f9zcqbzrjkn78qbpd4"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'no-compat-shim-dependency
- ;; shutilwhich is only needed for python 3.3 and earlier
- (lambda _
- (substitute* "setup.py" (("^ *'shutilwhich'\n") ""))
- (substitute* "compiledb/compiler.py" (("shutilwhich") "shutil")))))))
- (propagated-inputs
- (list python-bashlex python-click))
- (native-inputs
- (list python-pytest))
- (home-page
- "https://github.com/nickdiego/compiledb")
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'no-compat-shim-dependency
+ ;; shutilwhich is only needed for python 3.3 and earlier
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "setup.py"
+ (("^ *'shutilwhich'\n")
+ ""))
+ (substitute* "compiledb/compiler.py"
+ (("shutilwhich")
+ "shutil"))
+ (substitute* "tests/data/multiple_commands_oneline.txt"
+ (("/bin/echo")
+ (search-input-file inputs "bin/echo"))))))))
+ (propagated-inputs (list python-bashlex python-click))
+ (native-inputs (list python-pytest python-setuptools python-wheel))
+ (home-page "https://github.com/nickdiego/compiledb")
(synopsis
- "Generate Clang JSON Compilation Database files for make-based build systems")
+ "Generate Clang JSON Compilation Database files for make-based build systems")
(description
"@code{compiledb} provides a @code{make} python wrapper script which,
besides executing the make build command, updates the JSON compilation