tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
algol68g: init at 2.8.4
AndersonTorres
4 years ago
2833fb0e
303e44b3
+84
3 changed files
expand all
collapse all
unified
split
pkgs
development
compilers
algol68g
0001-plotutils-png-support.diff
default.nix
top-level
all-packages.nix
+27
pkgs/development/compilers/algol68g/0001-plotutils-png-support.diff
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
diff -Naur algol68g-2.8.4-old/source/plotutils.c algol68g-2.8.4-new/source/plotutils.c
2
+
--- algol68g-2.8.4-old/source/plotutils.c 2016-10-11 18:14:48.000000000 -0300
3
+
+++ algol68g-2.8.4-new/source/plotutils.c 2021-07-30 02:42:29.762627511 -0300
4
+
@@ -1026,10 +1026,10 @@
5
+
X_COORD (&DEVICE (f)) = 0;
6
+
Y_COORD (&DEVICE (f)) = 0;
7
+
return (PLOTTER (&DEVICE (f)));
8
+
- } else if (!strcmp (device_type, "gif")) {
9
+
-/*------------------------------------+
10
+
-| Supported plotter type - pseudo GIF |
11
+
-+------------------------------------*/
12
+
+ } else if (!strcmp (device_type, "gif") || !strcmp (device_type, "gif")) {
13
+
+/*-------------------------------------------+
14
+
+| Supported plotter type - pseudo GIF or PNG |
15
+
++-------------------------------------------*/
16
+
char *z = DEREF (char, &A68_PAGE_SIZE (&DEVICE (f))), size[BUFFER_SIZE];
17
+
/* Establish page size */
18
+
if (!scan_int (&z, &(WINDOW_X_SIZE (&DEVICE (f))))) {
19
+
@@ -1067,7 +1067,7 @@
20
+
(void) pl_setplparam (PLOTTER_PARAMS (&DEVICE (f)), "BITMAPSIZE", size);
21
+
(void) pl_setplparam (PLOTTER_PARAMS (&DEVICE (f)), "BG_COLOR", (void *) "black");
22
+
(void) pl_setplparam (PLOTTER_PARAMS (&DEVICE (f)), "GIF_ANIMATION", (void *) "no");
23
+
- PLOTTER (&DEVICE (f)) = pl_newpl_r ("gif", NULL, STREAM (&DEVICE (f)), stderr, PLOTTER_PARAMS (&DEVICE (f)));
24
+
+ PLOTTER (&DEVICE (f)) = pl_newpl_r (device_type, NULL, STREAM (&DEVICE (f)), stderr, PLOTTER_PARAMS (&DEVICE (f)));
25
+
if (PLOTTER (&DEVICE (f)) == NULL) {
26
+
diagnostic_node (A68_RUNTIME_ERROR, p, ERROR_DEVICE_CANNOT_OPEN);
27
+
exit_genie (p, A68_RUNTIME_ERROR);
+55
pkgs/development/compilers/algol68g/default.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{ lib
2
+
, stdenv
3
+
, fetchurl
4
+
, gsl
5
+
, plotutils
6
+
, postgresql
7
+
}:
8
+
9
+
stdenv.mkDerivation rec {
10
+
pname = "algol68g";
11
+
version = "2.8.4";
12
+
13
+
src = fetchurl {
14
+
url = "https://jmvdveer.home.xs4all.nl/${pname}-${version}.tar.gz";
15
+
hash = "sha256-WCPM0MGP4Qo2ihF8w5JHSMSl0P6N/w2dgY/3PDQlZfA=";
16
+
};
17
+
18
+
patches = [
19
+
# add PNG support
20
+
./0001-plotutils-png-support.diff
21
+
];
22
+
23
+
buildInputs = [
24
+
gsl
25
+
plotutils
26
+
postgresql
27
+
];
28
+
29
+
postInstall = let
30
+
pdfdoc = fetchurl {
31
+
url = "https://jmvdveer.home.xs4all.nl/learning-algol-68-genie.pdf";
32
+
hash = "sha256-QCwn1e/lVfTYTeolCFErvfMhvwCgsBnASqq2K+NYmlU=";
33
+
};
34
+
in
35
+
''
36
+
install -m644 ${pdfdoc} $out/share/doc/${pname}/learning-algol-68-genie.pdf
37
+
'';
38
+
39
+
meta = with lib; {
40
+
homepage = "https://jmvdveer.home.xs4all.nl/en.algol-68-genie.html";
41
+
description = "Algol 68 Genie compiler-interpreter";
42
+
longDescription = ''
43
+
Algol 68 Genie (a68g) is a recent checkout hybrid compiler-interpreter,
44
+
written from scratch by Marcel van der Veer. It ranks among the most
45
+
complete Algol 68 implementations. It implements for example arbitrary
46
+
precision arithmetic, complex numbers, parallel processing, partial
47
+
parametrisation and formatted transput, as well as support for curses,
48
+
regular expressions and sounds. It can be linked to GNU plotutils, the GNU
49
+
scientific library and PostgreSQL.
50
+
'';
51
+
license = licenses.gpl3Plus;
52
+
maintainers = with maintainers; [ AndersonTorres ];
53
+
platforms = platforms.unix;
54
+
};
55
+
}
+2
pkgs/top-level/all-packages.nix
···
10672
10673
aldor = callPackage ../development/compilers/aldor { };
10674
0
0
10675
aliceml = callPackage ../development/compilers/aliceml { };
10676
10677
armips = callPackage ../development/compilers/armips { };
···
10672
10673
aldor = callPackage ../development/compilers/aldor { };
10674
10675
+
algol68g = callPackage ../development/compilers/algol68g { };
10676
+
10677
aliceml = callPackage ../development/compilers/aliceml { };
10678
10679
armips = callPackage ../development/compilers/armips { };