1{ lib, stdenv, fetchurl, fetchpatch }:
2
3stdenv.mkDerivation rec {
4 pname = "nqc";
5 version = "3.1.r6";
6
7 src = fetchurl {
8 url = "https://bricxcc.sourceforge.net/nqc/release/nqc-${version}.tgz";
9 sha256 = "sha256-v9XmVPY5r3pYjP3vTSK9Xvz/9UexClbOvr3ljvK/52Y=";
10 };
11
12 sourceRoot = ".";
13
14 patches = [
15 ./nqc-unistd.patch
16 (fetchpatch {
17 url = "https://sourceforge.net/p/bricxcc/patches/_discuss/thread/00b427dc/b84b/attachment/nqc-01-Linux_usb_and_tcp.diff";
18 sha256 = "sha256-UZmmhhhfLAUus36TOBhiDQ8KUeEdYhGHVFwqKqDIqII=";
19 })
20 ];
21
22 makeFlags = [ "PREFIX=$(out)" ];
23
24 dontConfigure = true;
25
26 meta = with lib; {
27 homepage = "https://bricxcc.sourceforge.net/nqc/";
28 description = "A programming language for several LEGO MINDSTORMS products including the RCX, CyberMaster, and Scout";
29 platforms = platforms.linux;
30 license = licenses.mpl10;
31 maintainers = with maintainers; [ christophcharles ];
32 };
33}