tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
gforth: enable swig bindings
Herwig Hochleitner
4 years ago
08836b25
1a5c6d8d
+28
-46
3 changed files
expand all
collapse all
unified
split
pkgs
development
compilers
gforth
default.nix
fix-install-txt.patch
swig.nix
+12
-21
pkgs/development/compilers/gforth/default.nix
reviewed
···
1
1
-
{ lib, stdenv, callPackage, autoreconfHook, texinfo, fetchFromGitHub
2
2
-
, swig, libffi
1
1
+
{ lib, stdenv, fetchFromGitHub, callPackage
2
2
+
, autoreconfHook, texinfo, libffi
3
3
}:
4
4
+
4
5
let
5
5
-
version = "0.7.9_20211111";
6
6
-
sha256 = "sha256-KwYPMWdsL9o8SVcNdENMs4C9ioFBEfyVMqe5bgIrfzs=";
7
7
-
## FIXME build https://github.com/GeraldWodni/swig with gforth, then rebuild
8
8
-
#### This will get rid of the configuration warning
9
9
-
# swigf = swig.overrideDerivation (old: {
10
10
-
# configureFlags = old.configureFlags ++ [
11
11
-
# "--enable-forth"
12
12
-
# ];
13
13
-
# });
6
6
+
swig = callPackage ./swig.nix { };
14
7
bootForth = callPackage ./boot-forth.nix { };
8
8
+
in stdenv.mkDerivation rec {
15
9
16
16
-
in stdenv.mkDerivation {
17
17
-
pname = "gforth";
18
18
-
inherit version;
10
10
+
name = "gforth-${version}";
11
11
+
version = "0.7.9_20220127";
12
12
+
19
13
src = fetchFromGitHub {
20
14
owner = "forthy42";
21
15
repo = "gforth";
22
16
rev = version;
23
23
-
inherit sha256;
17
17
+
sha256 = "sha256-3+ObHhsPvW44UFiN0GWOhwo7aiqhjwxNY8hw2Wv4MK0=";
24
18
};
25
25
-
patches = [ ./fix-install-txt.patch ];
26
19
27
20
nativeBuildInputs = [
28
28
-
autoreconfHook texinfo bootForth
21
21
+
autoreconfHook texinfo bootForth swig
29
22
];
30
23
buildInputs = [
31
31
-
swig libffi
24
24
+
libffi
32
25
];
33
26
34
27
passthru = { inherit bootForth; };
35
28
36
36
-
configureFlags =
37
37
-
lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ];
29
29
+
configureFlags = lib.optional stdenv.isDarwin [ "--build=x86_64-apple-darwin" ];
38
30
39
31
postInstall = ''
40
32
mkdir -p $out/share/emacs/site-lisp
···
47
39
license = lib.licenses.gpl3;
48
40
platforms = lib.platforms.all;
49
41
};
50
50
-
51
42
}
-25
pkgs/development/compilers/gforth/fix-install-txt.patch
reviewed
···
1
1
-
From c03408921ee8f5592e19cfcb64132a320fbd6279 Mon Sep 17 00:00:00 2001
2
2
-
From: Herwig Hochleitner <herwig@bendlas.net>
3
3
-
Date: Thu, 9 Sep 2021 18:19:42 +0200
4
4
-
Subject: [PATCH 1/2] fix install-txt task
5
5
-
6
6
-
---
7
7
-
Makefile.in | 2 +-
8
8
-
1 file changed, 1 insertion(+), 1 deletion(-)
9
9
-
10
10
-
diff --git a/Makefile.in b/Makefile.in
11
11
-
index 5fe49787..51ad67c6 100644
12
12
-
--- a/Makefile.in
13
13
-
+++ b/Makefile.in
14
14
-
@@ -839,7 +839,7 @@ install-gensources:
15
15
-
done
16
16
-
echo "\\ empty site-init" > $(siteforthdir)/siteinit.fs
17
17
-
18
18
-
-install-txt: doc
19
19
-
+install-txt: txt
20
20
-
$(INSTALL_DATA) doc/gforth.txt $(datadir)/gforth/$(VERSION)/doc/gforth.txt
21
21
-
22
22
-
install-images: install-txt
23
23
-
--
24
24
-
2.33.0
25
25
-
+16
pkgs/development/compilers/gforth/swig.nix
reviewed
···
1
1
+
{ swig3, fetchFromGitHub }:
2
2
+
3
3
+
## for updating to swig4, see
4
4
+
## https://github.com/GeraldWodni/swig/pull/6
5
5
+
swig3.overrideDerivation (old: {
6
6
+
version = "3.0.9-forth";
7
7
+
src = fetchFromGitHub {
8
8
+
owner = "GeraldWodni";
9
9
+
repo = "swig";
10
10
+
rev = "a45b807e5f9d8ca1a43649c8265d2741a393862a";
11
11
+
sha256 = "sha256-6nOOPFGFNaQInEkul0ZAh+ks9n3wqCQ6/tbduvG/To0=";
12
12
+
};
13
13
+
configureFlags = old.configureFlags ++ [
14
14
+
"--enable-forth"
15
15
+
];
16
16
+
})