-
Notifications
You must be signed in to change notification settings - Fork 0
/
libyaml.nix
79 lines (69 loc) · 1.69 KB
/
libyaml.nix
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
68
69
70
71
72
73
74
75
76
77
78
79
{ lib
, stdenv
, guile
, libyaml
, guile-nyacc
, scheme-bytestructures
, fetchFromGitHub
}:
stdenv.mkDerivation rec {
pname = "guile-libyaml";
version = "0.1";
src = fetchFromGitHub {
owner = "mwette";
repo = "guile-libyaml";
rev = "2bdacb72a65ab63264b2edc9dac9692df7ec9b3e";
sha256 = "8SCthUVwSKlsCcyTpruXHD6R+xgLxZ0FpXKHmINfWq8=";
};
nativeBuildInputs = [
guile
guile-nyacc
];
buildInputs = [
guile
guile-nyacc
libyaml
scheme-bytestructures
];
propagatedBuildInputs = [
guile
guile-nyacc
scheme-bytestructures
];
outputs = [ "out" ];
sourceRoot = ".";
postUnpack = ''
#ls --color=auto source
cd source
rm guix.scm \
demo1.yml \
demo1.scm
#yaml/libyaml.scm \
#yaml/ffi-help-rt.scm
cp "${guile-nyacc}"/share/guile/site/system/ffi-help-rt.scm \
yaml/ffi-help-rt.scm
sed -i 's#system ffi-help-rt#yaml ffi-help-rt#' \
yaml/ffi-help-rt.scm
'';
##equiv to add-before buildPhase
preBuild = ''
guild compile-ffi --no-exec yaml/libyaml.ffi
#ls --color=auto
#ls --color=auto yaml
sed -i 's#system ffi-help-rt#yaml ffi-help-rt#' \
yaml/libyaml.scm
sed -i 's#dynamic-link "libyaml"#dynamic-link "${libyaml}/lib/libyaml"#' \
yaml/libyaml.scm
'';
dontInstall = true;
meta = with lib; {
description = "Guile wrapper for libYAML";
homepage = "https://github.com/mwette/guile-libyaml";
##this is a port of guix.scm from mwette/guile-libyaml
license = licenses.lgpl3Plus;
broken = !(versionOlder "2.0.13" guile.version);
#taken from ./nyacc.nix
maintainers = with maintainers; [ ];
platforms = platforms.unix;
};
}