1 { lib, stdenv, fetchpatch, fetchurl, bison, perl }:
6 debianPatch = patchname: hash: fetchpatch {
7 name = "${patchname}.patch";
8 url = "https://sources.debian.org/data/main/b/bulletml/${version}-${debianRevision}/debian/patches/${patchname}.patch";
13 url = "http://shinh.skr.jp/libbulletml/libbulletml-${version}.tar.bz2";
14 sha256 = "0yda0zgj2ydgkmby5676f5iiawabxadzh5p7bmy42998sp9g6dvw";
18 url = "http://shinh.skr.jp/d/d_cpp.tar.bz2";
19 sha256 = "1ly9qmbb8q9nyadmdap1gmxs3vkniqgchlv2hw7riansz4gg1agh";
27 srcs = [ lib_src cpp_src ];
29 postUnpack = "mv d_cpp bulletml/";
30 sourceRoot = "bulletml";
33 (debianPatch "fixes" "0cnr968n0h50fjmjijx7idsa2pg2pv5cwy6nvfbkx9z8w2zf0mkl")
34 (debianPatch "bulletml_d" "03d1dgln3gkiw019pxn3gwgjkmvzisq8kp3n6fpn38yfwh4fp4hv")
35 (debianPatch "d_cpp" "04g9c7c89w7cgrxw75mcbdhzxqmz1716li49mhl98znakchrlb9h")
36 (debianPatch "warnings" "18px79x4drvm6dy6w6js53nzlyvha7qaxhz5a99b97pyk3qc7i9g")
37 (debianPatch "makefile" "0z6yxanxmarx0s08gh12pk2wfqjk8g797wmfcqczdv1i6xc7nqzp")
38 (debianPatch "includes" "1n11j5695hs9pspslf748w2cq5d78s6bwhyl476wp6gcq6jw20bw")
44 nativeBuildInputs = [ bison perl ];
45 hardeningDisable = [ "format" ];
48 install -D -m 644 src/bulletml.d "$out"/include/d/bulletml.d
49 install -d "$out"/include/bulletml/tinyxml
50 install -m 644 src/*.h "$out"/include/bulletml
51 install -m 644 src/tinyxml/tinyxml.h "$out"/include/bulletml/tinyxml
52 cp -r src/boost $out/include/boost
55 install -m 644 src/libbulletml.{a,so}* "$out"/lib
57 install -D -m 644 README "$out"/share/doc/libbulletml/README.jp
58 install -m 644 README.en "$out"/share/doc/libbulletml
59 install -m 644 README.bulletml "$out"/share/doc/libbulletml
60 install -D -m 644 README "$out"/share/licenses/libbulletml/README.jp
61 install -m 644 README.en "$out"/share/licenses/libbulletml
65 description = "C++ library to handle BulletML easily";
67 BulletML is the Bullet Markup Language. BulletML can describe the barrage
68 of bullets in shooting games.
70 homepage = "http://www.asahi-net.or.jp/~cs8k-cyu/bulletml/index_e.html";
71 license = licenses.bsd3;
72 maintainers = with maintainers; [ fgaz ];
73 # See https://github.com/NixOS/nixpkgs/pull/35482
74 # for some attempts in getting it to build on darwin
75 platforms = platforms.linux;