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