[bug#33976] gnu: Add dev86.

Message ID 20190104172414.21142-1-dannym@scratchpost.org
State Accepted
Headers show
Series [bug#33976] gnu: Add dev86. | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed

Commit Message

Danny Milosavljevic Jan. 4, 2019, 5:24 p.m. UTC
* gnu/packages/assembly.scm (dev86): New variable.
---
 gnu/packages/assembly.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

Comments

Ludovic Courtès Jan. 9, 2019, 4:21 p.m. UTC | #1
Hi,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> * gnu/packages/assembly.scm (dev86): New variable.

[...]

> +    (arguments
> +     `(#:make-flags (list "-j" "1" ; They use submakes wrong

Maybe #:parallel-build? #f for clarity.

> +       #:system "i686-linux" ; Standalone ld86 had problems otherwise

Please add ‘supported-systems’ accordingly.

> +       #:tests? #f ; No tests exist
> +       #:phases
> +       (modify-phases %standard-phases
> +        (delete 'configure)
> +        (add-before 'install 'mkdir
> +          (lambda* (#:key outputs #:allow-other-keys)
> +            (let ((out (assoc-ref outputs "out")))
> +              (mkdir-p (string-append out "/bin"))
> +              (mkdir-p (string-append out "/man/man1"))
> +              #t))))))
> +    (synopsis "X86 16-bit assembler, C compiler and linker")
> +    (description "This package provides a X86 16-bit assembler, a C compiler
> +and a linker.")

s/X86/Intel 8086/, no?

It’d be nice to add a few words about what’s special about this
toolchain (not obvious from their README…).

> +    (home-page "https://github.com/jbruchon/dev86")
> +    (license license:gpl2)))

There are no headers in source files so it should be gpl2+.

OK with these changes, thank you!

Ludo’.
Danny Milosavljevic Jan. 9, 2019, 6:34 p.m. UTC | #2
> It’d be nice to add a few words about what’s special about this
> toolchain (not obvious from their README…).

It's primarily 16-bit.  I package it because of xen which uses it to compile
old-school BIOSes.

It was quite popular in 1990 and used even by the Linux kernel.

Nowadays, few projects still use it. 

I pushed it as 1bde3d2cbf311f6d6c733339a000b7395cb2f945.

Please amend description if necessary.
Ludovic Courtès Jan. 10, 2019, 8:31 a.m. UTC | #3
Hello,

Danny Milosavljevic <dannym@scratchpost.org> skribis:

> It's primarily 16-bit.  I package it because of xen which uses it to compile
> old-school BIOSes.
>
> It was quite popular in 1990 and used even by the Linux kernel.

Oh, fun.

> I pushed it as 1bde3d2cbf311f6d6c733339a000b7395cb2f945.

Thanks!

> Please amend description if necessary.

I’m not in a good position to do that because I know too little about
it.  In general, I don’t think the burden should be on the reviewer—we
already have too few people reviewing patches.

Ludo’.
Danny Milosavljevic Jan. 10, 2019, 1:01 p.m. UTC | #4
Hi Ludo,

On Thu, 10 Jan 2019 09:31:55 +0100
Ludovic Courtès <ludo@gnu.org> wrote:

> > Please amend description if necessary.  
> 
> I’m not in a good position to do that because I know too little about
> it.  In general, I don’t think the burden should be on the reviewer—we
> already have too few people reviewing patches.

I agree!  I had already extended the description.  I meant don't hesitate to
edit it further if you want to.

Patch

diff --git a/gnu/packages/assembly.scm b/gnu/packages/assembly.scm
index 763d183cf..63f799f41 100644
--- a/gnu/packages/assembly.scm
+++ b/gnu/packages/assembly.scm
@@ -122,3 +122,37 @@  abstracts over the target CPU by exposing a standardized RISC instruction set
 to the clients.")
     (home-page "https://www.gnu.org/software/lightning/")
     (license license:gpl3+)))
+
+(define-public dev86
+  (package
+    (name "dev86")
+    (version "0.16.21")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "http://v3.sk/~lkundrak/dev86/Dev86src-"
+                                 version ".tar.gz"))
+             (sha256
+              (base32
+               "154dyr2ph4n0kwi8yx0n78j128kw29rk9r9f7s2gddzrdl712jr3"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags (list "-j" "1" ; They use submakes wrong
+                          "CC=gcc"
+                          (string-append "PREFIX="
+                                         (assoc-ref %outputs "out")))
+       #:system "i686-linux" ; Standalone ld86 had problems otherwise
+       #:tests? #f ; No tests exist
+       #:phases
+       (modify-phases %standard-phases
+        (delete 'configure)
+        (add-before 'install 'mkdir
+          (lambda* (#:key outputs #:allow-other-keys)
+            (let ((out (assoc-ref outputs "out")))
+              (mkdir-p (string-append out "/bin"))
+              (mkdir-p (string-append out "/man/man1"))
+              #t))))))
+    (synopsis "X86 16-bit assembler, C compiler and linker")
+    (description "This package provides a X86 16-bit assembler, a C compiler
+and a linker.")
+    (home-page "https://github.com/jbruchon/dev86")
+    (license license:gpl2)))