aboutsummaryrefslogtreecommitdiff
path: root/nix/nix-daemon/shared.hh
blob: b45e9f0cfdcef402cd65e74b23d522b6edf6213b (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* GNU Guix --- Functional package management for GNU
   Copyright (C) 2012  Ludovic Courtès <ludo@gnu.org>

   This file is part of GNU Guix.

   GNU Guix is free software; you can redistribute it and/or modify it
   under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or (at
   your option) any later version.

   GNU Guix is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.  */

/* Replacement for Nix's libmain/shared.hh.  */

#pragma once

#include <string>

#include <stdlib.h>
#include <signal.h>

static inline void
showManPage (const char *name)
{
  /* This idea is evil.  Abort.  */
  abort ();
}

extern volatile ::sig_atomic_t blockInt;

extern char **argvSaved;
Use 'chez-scheme-for-system'. * gnu/packages/loko.scm (loko-scheme): Likewise. * gnu/packages/emacs-xyz.scm (emacs-geiser-chez): Likewise Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/chez.scm33
-rw-r--r--gnu/packages/emacs-xyz.scm2
-rw-r--r--gnu/packages/loko.scm2
3 files changed, 26 insertions, 11 deletions
diff --git a/gnu/packages/chez.scm b/gnu/packages/chez.scm
index e7ddab0d1f..b3aadf3a78 100644
--- a/gnu/packages/chez.scm
+++ b/gnu/packages/chez.scm
@@ -47,7 +47,8 @@
#:use-module (ice-9 match)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
- #:export (nix-system->chez-machine
+ #:export (chez-scheme-for-system
+ nix-system->chez-machine
chez-machine->nonthreaded
chez-machine->threaded
unpack-nanopass+stex))
@@ -67,6 +68,20 @@
;;
;; Code:
+(define* (chez-scheme-for-system #:optional
+ (system (or (%current-target-system)
+ (%current-system))))
+ "Return 'chez-scheme' unless only 'chez-scheme-for-racket' supports SYSTEM,
+including support for native threads."
+ (if (or
+ ;; full support upstream
+ (and=> (chez-upstream-features-for-system system)
+ (cut memq 'threads <>))
+ ;; no support anywhere
+ (not (nix-system->chez-machine system)))
+ chez-scheme
+ chez-scheme-for-racket))
+
(define (chez-machine->nonthreaded machine)
"Given a string MACHINE naming a Chez Scheme machine type, returns a string
naming the nonthreaded machine type for the same architecture and OS as
@@ -751,7 +766,7 @@ create compilers, making them easier to understand and maintain.")
(file-name (git-file-name name version))))
(build-system gnu-build-system)
(native-inputs
- (list chez-scheme))
+ (list (chez-scheme-for-system)))
(arguments
(list #:make-flags (chez-make-flags name version)
#:test-target "test"
@@ -782,7 +797,7 @@ create compilers, making them easier to understand and maintain.")
(base32 "1dq25qygyncbfq4kwwqqgyyakfqjwhp5q23vrf3bff1p66nyfl3b"))))
(build-system gnu-build-system)
(native-inputs
- (list chez-scheme
+ (list (chez-scheme-for-system)
ghostscript
;; FIXME: This package fails to build with the error:
;; mktexpk: don't know how to create bitmap font for bchr8r
@@ -847,7 +862,7 @@ programming in Scheme.")
(base32 "1n5fbwwz51fdzvjackgmnsgh363g9inyxv7kmzi0469cwavwcx5m"))))
(build-system gnu-build-system)
(native-inputs
- (list chez-scheme
+ (list (chez-scheme-for-system)
chez-web
(texlive-updmap.cfg (list texlive-pdftex))))
(arguments
@@ -933,7 +948,7 @@ Chez Scheme.")
(inputs
(list chez-srfi)) ; for tests
(native-inputs
- (list chez-scheme))
+ (list (chez-scheme-for-system)))
(arguments
(list #:make-flags (chez-make-flags name version)
#:test-target "test"
@@ -965,7 +980,7 @@ Chez Scheme.")
(propagated-inputs
(list chez-srfi)) ; for irregex-utils
(native-inputs
- (list chez-scheme))
+ (list (chez-scheme-for-system)))
(arguments
(list #:make-flags (chez-make-flags name version)
#:test-target "test"
@@ -996,7 +1011,7 @@ syntax, with various aliases for commonly used patterns.")
(propagated-inputs
(list chez-srfi)) ; for irregex-utils
(native-inputs
- (list chez-scheme))
+ (list (chez-scheme-for-system)))
(arguments
(list #:make-flags (chez-make-flags name version)
#:test-target "chez-check"
@@ -1059,7 +1074,7 @@ strings.")
(inputs
(list chez-srfi)) ; for tests
(native-inputs
- (list chez-scheme))
+ (list (chez-scheme-for-system)))
(arguments
(list #:make-flags (chez-make-flags name version)
#:test-target "test"
@@ -1090,7 +1105,7 @@ required to port the program @code{Scmutils} to Chez Scheme.")
(inputs
(list chez-srfi)) ; for tests
(native-inputs
- (list chez-scheme))
+ (list (chez-scheme-for-system)))
(propagated-inputs
(list chez-mit chez-srfi))
(arguments
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index da0031cd00..f131734f76 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -451,7 +451,7 @@ a generic Scheme interaction mode for the GNU Emacs editor.")
(string-append
"(eval-after-load 'geiser-impl '" all ")"))))))))
(inputs
- (list chez-scheme))
+ (list (chez-scheme-for-system)))
(propagated-inputs
(list emacs-geiser))
(home-page "https://nongnu.org/geiser/")
diff --git a/gnu/packages/loko.scm b/gnu/packages/loko.scm
index ef9312afe3..449c62f1f0 100644
--- a/gnu/packages/loko.scm
+++ b/gnu/packages/loko.scm
@@ -71,7 +71,7 @@
#t)))))
(native-inputs
`(("akku" ,akku)
- ("chez-scheme" ,chez-scheme)
+ ("chez-scheme" ,(chez-scheme-for-system))
("struct" ,guile-struct-pack)
("laesare" ,guile-laesare)
("pfds" ,guile-pfds)