blob: 1e2d2956389eb3ba2b16b19986f0d68b5fe074c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
{
lib,
stdenv,
fetchFromCodeberg,
autoreconfHook,
fig2dev,
readline,
libx11,
bluez,
SDL2,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "x11basic";
version = "1.28-65";
src = fetchFromCodeberg {
owner = "kollo";
repo = "X11Basic";
tag = finalAttrs.version;
hash = "sha256-07sRUFKJ4CYMtQhRu18PElvNQN2DyKkRJUt7oIhenkA=";
};
sourceRoot = "${finalAttrs.src.name}/src";
postPatch = ''
chmod -R u+w examples/compiler
substituteInPlace configure.in \
--replace-fail "main(foo)" "int main(int foo)"
'';
nativeBuildInputs = [
autoreconfHook
fig2dev
];
buildInputs = [
readline
libx11
SDL2
bluez
];
configureFlags = [
"--with-bluetooth"
"--with-usb"
"--with-readline"
"--with-sdl"
"--with-x"
"--enable-cryptography"
];
preInstall = ''
touch x11basic.{eps,svg}
mkdir -p $out/{bin,lib}
mkdir -p $out/share/{applications,icons/hicolor/scalable/apps}
cp -r ../examples $out/share/.
'';
meta = {
homepage = "https://x11-basic.codeberg.page";
description = "Basic interpreter and compiler with graphics capabilities";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ edwtjo ];
platforms = lib.platforms.unix;
};
})
|