summary refs log tree commit diff
path: root/pkgs/tools/graphics/cfdg/default.nix
blob: 9376ad6a709c0217096fe67c9da864445f3f700e (plain) (blame)
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
a @ {libpng, bison, flex, ffmpeg, fullDepEntry, ...} :  
let 
  s = import ./src-for-default.nix;
  buildInputs = with a; [
    libpng bison flex ffmpeg
  ];
in
rec {
  src = a.fetchUrlFromSrcInfo s;

  inherit (s) name;
  inherit buildInputs;
  configureFlags = [];

  /* doConfigure should be removed if not needed */
  phaseNames = ["doFixInc" "doMake" "copyFiles"];
 
  doFixInc = a.fullDepEntry ''
    sed -e "/YY_NO_UNISTD/a#include <stdio.h>" -i src-common/cfdg.l
  '' ["doUnpack" "minInit"];
 
  copyFiles = a.fullDepEntry ''
    mkdir -p $out/bin
    cp cfdg $out/bin/

    mkdir -p $out/share/doc/${name}
    cp *.txt $out/share/doc/${name}
  '' ["defEnsureDir" "doMake"];
      
  meta = {
    description = "Context-free design grammar - a tool for graphics generation";
    maintainers = [
      a.lib.maintainers.raskin
    ];
    platforms = with a.lib.platforms; 
      linux;
  };
}