1{ stdenv, fetchFromGitHub, bobcat, icmake, yodl }:
2
3stdenv.mkDerivation rec {
4 name = "flexc++-${version}";
5 version = "2.04.00";
6
7 src = fetchFromGitHub {
8 sha256 = "0fz9gxpc491cngj9z9y059vbl65ng48c4nw9k3sl983zfnqfy26y";
9 rev = version;
10 repo = "flexcpp";
11 owner = "fbb-git";
12 };
13
14 sourceRoot = "flexcpp-${version}-src/flexc++";
15
16 buildInputs = [ bobcat ];
17 nativeBuildInputs = [ icmake yodl ];
18
19 postPatch = ''
20 substituteInPlace INSTALL.im --replace /usr $out
21 patchShebangs .
22 '';
23
24 buildPhase = ''
25 ./build man
26 ./build manual
27 ./build program
28 '';
29
30 installPhase = ''
31 ./build install x
32 '';
33
34 meta = with stdenv.lib; {
35 description = "C++ tool for generating lexical scanners";
36 longDescription = ''
37 Flexc++ was designed after `flex'. Flexc++ offers a cleaner class design
38 and requires simpler specification files than offered by flex's C++
39 option.
40 '';
41 homepage = https://fbb-git.github.io/flexcpp/;
42 license = licenses.gpl3;
43 platforms = platforms.linux;
44 maintainers = with maintainers; [ nckx ];
45 };
46}