nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ stdenv, fetchFromGitHub, python, autoreconfHook, pkgconfig, makeWrapper
2, flex
3, gettext, libedit, glib, imagemagick, libxml2, boost, gnuplot, graphviz
4, tesseract, gts, libXtst
5}:
6stdenv.mkDerivation rec {
7 version = "0.39";
8 name = "fMBT-${version}";
9
10 src = fetchFromGitHub {
11 owner = "intel";
12 repo = "fMBT";
13 rev = "v${version}";
14 sha256 = "15sxwdcsjybq50vkla4md2ay8m67ndc4vwcsl5vwsjkim5qlxslb";
15 };
16
17 nativeBuildInputs = [ autoreconfHook pkgconfig flex makeWrapper
18 python.pkgs.wrapPython ];
19
20 buildInputs = [ python gettext libedit glib imagemagick libxml2 boost
21 gnuplot graphviz tesseract gts
22 ];
23
24 propagatedBuildInputs = with python.pkgs; [
25 pyside pydbus pexpect pysideShiboken
26 ];
27
28 preBuild = ''
29 export PYTHONPATH="$PYTHONPATH:$out/lib/python${python.pythonVersion}/site-packages"
30 export PATH="$PATH:$out/bin"
31 export LD_LIBRARY_PATH="${stdenv.lib.makeLibraryPath [libXtst]}"
32 '';
33
34 postInstall = ''
35 echo -e '#! ${stdenv.shell}\npython "$@"' > "$out/bin/fmbt-python"
36 chmod a+x "$out/bin/fmbt-python"
37 patchShebangs "$out/bin"
38 for i in "$out"/bin/*; do
39 wrapProgram "$i" --suffix "PATH" ":" "$PATH" \
40 --suffix "PYTHONPATH" ":" "$PYTHONPATH" \
41 --suffix "LD_LIBRARY_PATH" ":" "$LD_LIBRARY_PATH"
42 done
43 '';
44
45 meta = with stdenv.lib; {
46 description = "Free Model-Based Testing tool";
47 homepage = "https://github.com/intel/fMBT";
48 license = licenses.lgpl21;
49 platforms = platforms.linux;
50 maintainers = with maintainers; [ raskin ];
51 };
52}
53