diff options
author | Christoph Charles <23055925+christophcharles@users.noreply.github.com> | 2022-10-16 11:38:33 +0200 |
---|---|---|
committer | Christoph Charles <23055925+christophcharles@users.noreply.github.com> | 2022-10-23 15:51:10 +0200 |
commit | adc5c77dc99920fe7bc240c6f3adb2b246567047 (patch) | |
tree | 360aac5daeb5749bfbdd1508c8c144c97752ac30 | |
parent | ad7bf0e1fa0ba5d21c4528567c18aab901522a45 (diff) |
nqc: init at 3.1.r6
-rw-r--r-- | pkgs/development/compilers/nqc/default.nix | 33 | ||||
-rw-r--r-- | pkgs/development/compilers/nqc/nqc-unistd.patch | 11 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 2 |
3 files changed, 46 insertions, 0 deletions
diff --git a/pkgs/development/compilers/nqc/default.nix b/pkgs/development/compilers/nqc/default.nix new file mode 100644 index 0000000000000..a532b7df8580d --- /dev/null +++ b/pkgs/development/compilers/nqc/default.nix @@ -0,0 +1,33 @@ +{ lib, stdenv, fetchurl, fetchpatch }: + +stdenv.mkDerivation rec { + pname = "nqc"; + version = "3.1.r6"; + + src = fetchurl { + url = "https://bricxcc.sourceforge.net/nqc/release/nqc-${version}.tgz"; + sha256 = "sha256-v9XmVPY5r3pYjP3vTSK9Xvz/9UexClbOvr3ljvK/52Y="; + }; + + sourceRoot = "."; + + patches = [ + ./nqc-unistd.patch + (fetchpatch { + url = "https://sourceforge.net/p/bricxcc/patches/_discuss/thread/00b427dc/b84b/attachment/nqc-01-Linux_usb_and_tcp.diff"; + sha256 = "sha256-UZmmhhhfLAUus36TOBhiDQ8KUeEdYhGHVFwqKqDIqII="; + }) + ]; + + makeFlags = [ "PREFIX=$(out)" ]; + + dontConfigure = true; + + meta = with lib; { + homepage = "https://bricxcc.sourceforge.net/nqc/"; + description = "A programming language for several LEGO MINDSTORMS products including the RCX, CyberMaster, and Scout"; + platforms = platforms.linux; + license = licenses.mpl10; + maintainers = with maintainers; [ christophcharles ]; + }; +} diff --git a/pkgs/development/compilers/nqc/nqc-unistd.patch b/pkgs/development/compilers/nqc/nqc-unistd.patch new file mode 100644 index 0000000000000..7abf37f93ca7b --- /dev/null +++ b/pkgs/development/compilers/nqc/nqc-unistd.patch @@ -0,0 +1,11 @@ +diff -ruN nqc-3.1.r6-old/compiler/lexer.cpp nqc-3.1.r6-new/compiler/lexer.cpp +--- nqc-3.1.r6-old/compiler/lexer.cpp 2007-06-06 20:19:10.000000000 +0200 ++++ nqc-3.1.r6-new/compiler/lexer.cpp 2022-10-13 07:57:08.247213954 +0200 +@@ -11,6 +11,7 @@ + #define YY_FLEX_MINOR_VERSION 5 + + #include <stdio.h> ++#include <unistd.h> + + #if defined(__MWERKS__) && !__MACH__ && !YY_NEVER_INTERACTIVE + #include <unix.h> diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 74176742d1db9..f75bb70d9f55e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14612,6 +14612,8 @@ with pkgs; nasmfmt = callPackage ../development/tools/nasmfmt { }; + nqc = callPackage ../development/compilers/nqc { }; + nvidia_cg_toolkit = callPackage ../development/compilers/nvidia-cg-toolkit { }; obliv-c = callPackage ../development/compilers/obliv-c |