diff options
author | Profpatsch <mail@profpatsch.de> | 2019-04-02 12:10:28 +0200 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2019-04-02 12:12:53 +0200 |
commit | 0ea4fa96f4e6a1de27f50a97db9007e14958547d (patch) | |
tree | 084cce0b4a75642c021b3f76ebe768be1fed7dc9 /pkgs/profpatsch/s6/dhall/unix/Signal | |
parent | a015bbe903ccc0e5f8736d41f14c768672929564 (diff) |
pkgs/profpatsch: add dhall types for s6 servicedir
First version of a way to build s6 services using `dhall-to-nix`. Includes a small library that formalizes the tables in `man 7 signal`.
Diffstat (limited to 'pkgs/profpatsch/s6/dhall/unix/Signal')
16 files changed, 243 insertions, 0 deletions
diff --git a/pkgs/profpatsch/s6/dhall/unix/Signal/alpha.dhall b/pkgs/profpatsch/s6/dhall/unix/Signal/alpha.dhall new file mode 100644 index 00000000..f244a954 --- /dev/null +++ b/pkgs/profpatsch/s6/dhall/unix/Signal/alpha.dhall @@ -0,0 +1 @@ +./common/alpha-sparc.dhall ⫽ ./misc/alpha-sparc.dhall \ No newline at end of file diff --git a/pkgs/profpatsch/s6/dhall/unix/Signal/arm.dhall b/pkgs/profpatsch/s6/dhall/unix/Signal/arm.dhall new file mode 100644 index 00000000..35678618 --- /dev/null +++ b/pkgs/profpatsch/s6/dhall/unix/Signal/arm.dhall @@ -0,0 +1 @@ +./x86.dhall \ No newline at end of file diff --git a/pkgs/profpatsch/s6/dhall/unix/Signal/common/alpha-sparc.dhall b/pkgs/profpatsch/s6/dhall/unix/Signal/common/alpha-sparc.dhall new file mode 100644 index 00000000..cebdc49c --- /dev/null +++ b/pkgs/profpatsch/s6/dhall/unix/Signal/common/alpha-sparc.dhall @@ -0,0 +1,35 @@ + ./standard.dhall + ⫽ { SIGUSR1 = + 30 + , SIGUSR2 = + 31 + , SIGCHLD = + 20 + , SIGCONT = + 19 + , SIGSTOP = + 17 + , SIGTSTP = + 18 + , SIGTTIN = + 21 + , SIGTTOU = + 22 + , SIGBUS = + 10 + , SIGPOLL = + 23 + , SIGPROF = + 27 + , SIGSYS = + 12 + , SIGURG = + 16 + , SIGVTALRM = + 26 + , SIGXCPU = + 24 + , SIGXFSZ = + 25 + } +: ./type.dhall \ No newline at end of file diff --git a/pkgs/profpatsch/s6/dhall/unix/Signal/common/constants.dhall b/pkgs/profpatsch/s6/dhall/unix/Signal/common/constants.dhall new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/pkgs/profpatsch/s6/dhall/unix/Signal/common/constants.dhall diff --git a/pkgs/profpatsch/s6/dhall/unix/Signal/common/mips.dhall b/pkgs/profpatsch/s6/dhall/unix/Signal/common/mips.dhall new file mode 100644 index 00000000..be70924e --- /dev/null +++ b/pkgs/profpatsch/s6/dhall/unix/Signal/common/mips.dhall @@ -0,0 +1,35 @@ + ./standard.dhall + ⫽ { SIGUSR1 = + 16 + , SIGUSR2 = + 17 + , SIGCHLD = + 18 + , SIGCONT = + 25 + , SIGSTOP = + 23 + , SIGTSTP = + 24 + , SIGTTIN = + 26 + , SIGTTOU = + 27 + , SIGBUS = + 10 + , SIGPOLL = + 22 + , SIGPROF = + 29 + , SIGSYS = + 12 + , SIGURG = + 21 + , SIGVTALRM = + 28 + , SIGXCPU = + 30 + , SIGXFSZ = + 31 + } +: ./type.dhall \ No newline at end of file diff --git a/pkgs/profpatsch/s6/dhall/unix/Signal/common/standard.dhall b/pkgs/profpatsch/s6/dhall/unix/Signal/common/standard.dhall new file mode 100644 index 00000000..7836bf10 --- /dev/null +++ b/pkgs/profpatsch/s6/dhall/unix/Signal/common/standard.dhall @@ -0,0 +1,25 @@ +{ SIGHUP = + 1 +, SIGINT = + 2 +, SIGQUIT = + 3 +, SIGILL = + 4 +, SIGTRAP = + 5 +, SIGABRT = + 6 +, SIGFPE = + 8 +, SIGKILL = + 9 +, SIGSEGV = + 11 +, SIGPIPE = + 13 +, SIGALRM = + 14 +, SIGTERM = + 15 +} \ No newline at end of file diff --git a/pkgs/profpatsch/s6/dhall/unix/Signal/common/type.dhall b/pkgs/profpatsch/s6/dhall/unix/Signal/common/type.dhall new file mode 100644 index 00000000..76ecb01d --- /dev/null +++ b/pkgs/profpatsch/s6/dhall/unix/Signal/common/type.dhall @@ -0,0 +1,63 @@ +let POSIX1990 = + { SIGHUP : + Natural + , SIGINT : + Natural + , SIGQUIT : + Natural + , SIGILL : + Natural + , SIGABRT : + Natural + , SIGFPE : + Natural + , SIGKILL : + Natural + , SIGSEGV : + Natural + , SIGPIPE : + Natural + , SIGALRM : + Natural + , SIGTERM : + Natural + , SIGUSR1 : + Natural + , SIGUSR2 : + Natural + , SIGCHLD : + Natural + , SIGCONT : + Natural + , SIGSTOP : + Natural + , SIGTSTP : + Natural + , SIGTTIN : + Natural + , SIGTTOU : + Natural + } + +let POSIX2001 = + { SIGBUS : + Natural + , SIGPOLL : + Natural + , SIGPROF : + Natural + , SIGSYS : + Natural + , SIGTRAP : + Natural + , SIGURG : + Natural + , SIGVTALRM : + Natural + , SIGXCPU : + Natural + , SIGXFSZ : + Natural + } + +in POSIX1990 ⩓ POSIX2001 \ No newline at end of file diff --git a/pkgs/profpatsch/s6/dhall/unix/Signal/common/x86-arm.dhall b/pkgs/profpatsch/s6/dhall/unix/Signal/common/x86-arm.dhall new file mode 100644 index 00000000..787afad9 --- /dev/null +++ b/pkgs/profpatsch/s6/dhall/unix/Signal/common/x86-arm.dhall @@ -0,0 +1,35 @@ + ./standard.dhall + ⫽ { SIGUSR1 = + 10 + , SIGUSR2 = + 12 + , SIGCHLD = + 17 + , SIGCONT = + 18 + , SIGSTOP = + 19 + , SIGTSTP = + 20 + , SIGTTIN = + 21 + , SIGTTOU = + 22 + , SIGBUS = + 7 + , SIGPOLL = + 29 + , SIGPROF = + 27 + , SIGSYS = + 31 + , SIGURG = + 23 + , SIGVTALRM = + 26 + , SIGXCPU = + 24 + , SIGXFSZ = + 25 + } +: ./type.dhall \ No newline at end of file diff --git a/pkgs/profpatsch/s6/dhall/unix/Signal/mips.dhall b/pkgs/profpatsch/s6/dhall/unix/Signal/mips.dhall new file mode 100644 index 00000000..63e071ba --- /dev/null +++ b/pkgs/profpatsch/s6/dhall/unix/Signal/mips.dhall @@ -0,0 +1 @@ +./common/mips.dhall ⫽ ./misc/mips.dhall \ No newline at end of file diff --git a/pkgs/profpatsch/s6/dhall/unix/Signal/misc/alpha-sparc.dhall b/pkgs/profpatsch/s6/dhall/unix/Signal/misc/alpha-sparc.dhall new file mode 100644 index 00000000..2ce0b50d --- /dev/null +++ b/pkgs/profpatsch/s6/dhall/unix/Signal/misc/alpha-sparc.dhall @@ -0,0 +1,14 @@ + { SIGIOT = + 6 + , SIGEMT = + 7 + , SIGIO = + 23 + , SIGPWR = + 29 + , SIGINFO = + 29 + , SIGWINCH = + 28 + } +: ./common-type.dhall ⩓ { SIGEMT : Natural, SIGINFO : Natural } \ No newline at end of file diff --git a/pkgs/profpatsch/s6/dhall/unix/Signal/misc/common-type.dhall b/pkgs/profpatsch/s6/dhall/unix/Signal/misc/common-type.dhall new file mode 100644 index 00000000..4f4cec9a --- /dev/null +++ b/pkgs/profpatsch/s6/dhall/unix/Signal/misc/common-type.dhall @@ -0,0 +1 @@ +{ SIGIOT : Natural, SIGIO : Natural, SIGPWR : Natural, SIGWINCH : Natural } \ No newline at end of file diff --git a/pkgs/profpatsch/s6/dhall/unix/Signal/misc/mips.dhall b/pkgs/profpatsch/s6/dhall/unix/Signal/misc/mips.dhall new file mode 100644 index 00000000..ac07c128 --- /dev/null +++ b/pkgs/profpatsch/s6/dhall/unix/Signal/misc/mips.dhall @@ -0,0 +1,14 @@ + { SIGIOT = + 6 + , SIGEMT = + 7 + , SIGIO = + 22 + , SIGCLD = + 18 + , SIGPWR = + 19 + , SIGWINCH = + 20 + } +: ./common-type.dhall ⩓ { SIGEMT : Natural, SIGCLD : Natural } \ No newline at end of file diff --git a/pkgs/profpatsch/s6/dhall/unix/Signal/misc/x86-arm.dhall b/pkgs/profpatsch/s6/dhall/unix/Signal/misc/x86-arm.dhall new file mode 100644 index 00000000..36fdd842 --- /dev/null +++ b/pkgs/profpatsch/s6/dhall/unix/Signal/misc/x86-arm.dhall @@ -0,0 +1,14 @@ + { SIGIOT = + 6 + , SIGSTKFLT = + 16 + , SIGIO = + 29 + , SIGPWR = + 30 + , SIGWINCH = + 28 + , SIGUNUSED = + 31 + } +: ./common-type.dhall ⩓ { SIGSTKFLT : Natural, SIGUNUSED : Natural } \ No newline at end of file diff --git a/pkgs/profpatsch/s6/dhall/unix/Signal/sparc.dhall b/pkgs/profpatsch/s6/dhall/unix/Signal/sparc.dhall new file mode 100644 index 00000000..bdbad021 --- /dev/null +++ b/pkgs/profpatsch/s6/dhall/unix/Signal/sparc.dhall @@ -0,0 +1 @@ +./alpha.dhall \ No newline at end of file diff --git a/pkgs/profpatsch/s6/dhall/unix/Signal/type.dhall b/pkgs/profpatsch/s6/dhall/unix/Signal/type.dhall new file mode 100644 index 00000000..55f6540c --- /dev/null +++ b/pkgs/profpatsch/s6/dhall/unix/Signal/type.dhall @@ -0,0 +1,2 @@ +-- A signal is a positive number +Natural \ No newline at end of file diff --git a/pkgs/profpatsch/s6/dhall/unix/Signal/x86.dhall b/pkgs/profpatsch/s6/dhall/unix/Signal/x86.dhall new file mode 100644 index 00000000..7030dd27 --- /dev/null +++ b/pkgs/profpatsch/s6/dhall/unix/Signal/x86.dhall @@ -0,0 +1 @@ +./common/x86-arm.dhall ⫽ ./misc/x86-arm.dhall \ No newline at end of file |