Unverified Commit b10ae8bd authored by Stanisław Pitucha's avatar Stanisław Pitucha Committed by GitHub
Browse files

Merge pull request #196026 from christophcharles/nqc

nqc: init at 3.1.r6
parents 2f397f1c adc5c77d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2471,6 +2471,12 @@
      fingerprint = "4EBB 30F1 E89A 541A A7F2  52BE 830A 9728 6309 66F4";
    }];
  };
  christophcharles = {
    email = "23055925+christophcharles@users.noreply.github.com";
    github = "christophcharles";
    githubId = 23055925;
    name = "Christoph Charles";
  };
  christopherpoole = {
    email = "mail@christopherpoole.net";
    github = "christopherpoole";
+33 −0
Original line number Diff line number Diff line
{ 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 ];
  };
}
+11 −0
Original line number Diff line number Diff line
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>
+2 −0
Original line number Diff line number Diff line
@@ -14743,6 +14743,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