summaryrefslogtreecommitdiff
path: root/gnu/packages/build-tools.scm
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-08-13 14:28:50 +0200
committerMarius Bakke <marius@gnu.org>2022-08-27 23:48:56 +0200
commitada35de38f6b04bbc3c5d0bed198cf22e5fa22d9 (patch)
tree263f5fa7489eda3998567983da9b36a65e584a75 /gnu/packages/build-tools.scm
parent34625246e47a2a1085ac63c96237a6938ab43f53 (diff)
gnu: scons: Move to (gnu packages build-tools).
* gnu/packages/python-xyz.scm (scons, scons-python2): Move from here ... * gnu/packages/build-tools.scm (scons, scons-python2): ... to here. * gnu/packages/direct-connect.scm, gnu/packages/disk.scm, gnu/packages/game-development.scm, gnu/packages/gps.scm, gnu/packages/image.scm, gnu/packages/installers.scm, gnu/packages/web.scm, gnu/packages/xdisorg.scm: Adjust module imports accordingly. * guix/build-system/scons.scm (default-scons): Likewise.
Diffstat (limited to 'gnu/packages/build-tools.scm')
-rw-r--r--gnu/packages/build-tools.scm45
1 files changed, 45 insertions, 0 deletions
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index 38a7ee2783..45f3ec559a 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -384,6 +384,51 @@ other lower-level build files.")
scripted definition of a software project and outputs @file{Makefile}s or
other lower-level build files.")))
+(define-public scons
+ (package
+ (name "scons")
+ (version "3.0.4")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/SCons/scons")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:use-setuptools? #f ; still relies on distutils
+ #:tests? #f ; no 'python setup.py test' command
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'bootstrap
+ (lambda _
+ (substitute* "src/engine/SCons/compat/__init__.py"
+ (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
+ "sys.modules[new] = __import__(old)"))
+ (substitute* "src/engine/SCons/Platform/__init__.py"
+ (("mod = imp.load_module\\(full_name, file, path, desc\\)")
+ "mod = __import__(full_name)"))
+ (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
+ (chdir "build/scons")
+ #t)))))
+ (home-page "https://scons.org/")
+ (synopsis "Software construction tool written in Python")
+ (description
+ "SCons is a software construction tool. Think of SCons as an improved,
+cross-platform substitute for the classic Make utility with integrated
+functionality similar to autoconf/automake and compiler caches such as ccache.
+In short, SCons is an easier, more reliable and faster way to build
+software.")
+ (license license:x11)))
+
+(define-public scons-python2
+ (package
+ (inherit (package-with-python2 scons))
+ (name "scons-python2")))
+
(define-public tup
(package
(name "tup")