@@ -1,16 +1,18 @@
1−{ stdenv, fetchFromGitHub, qt4, qmake4Hook, vcg, glew }:
1+{ stdenv, fetchFromGitHub, qtbase, vcg, glew, qmakeHook, makeQtWrapper, mesa }:
2+
23
34stdenv.mkDerivation {
4− name = "openbrf-2016-01-09";
5+ name = "openbrf-unstable-2016-01-09";
56
67 src = fetchFromGitHub {
78 owner = "cfcohen";
89 repo = "openbrf";
9− rev = "c18d7431e1d499cee11586f4a035fb5fdc0d3330";
10− sha256 = "0laikpz0ljz7l5fgapwj09ygizmvj1iywnpfgfd0i14j46s134xb";
10+ rev = "4bdc66e38def5e5184f5379c84a7558b7484c70a";
11+ sha256 = "16254cnr60ihcn7bki7wl1qm6gkvzb99cn66md1pnb7za8nvzf4j";
1112 };
1213
13− buildInputs = [ qt4 qmake4Hook vcg glew ];
14+ buildInputs = [ qtbase vcg glew ];
15+ nativeBuildInputs = [ qmakeHook makeQtWrapper ];
1416
1517 enableParallelBuilding = true;
1618
@@ -21,9 +23,19 @@ stdenv.mkDerivation {
2123 '';
2224
2325 installPhase = ''
24− install -Dm755 openBrf $out/bin/openBrf
26+ install -Dm755 openBrf $out/share/openBrf/openBrf
27+ install -Dm644 carry_positions.txt $out/share/openBrf/carry_positions.txt
28+ install -Dm644 reference.brf $out/share/openBrf/reference.brf
29+
30+ patchelf \
31+ --set-rpath "${stdenv.lib.makeLibraryPath [ qtbase glew stdenv.cc.cc mesa ]}" \
32+ $out/share/openBrf/openBrf
33+
34+ makeQtWrapper "$out/share/openBrf/openBrf" "$out/bin/openBrf"
2535 '';
2636
37+ dontPatchELF = true;
38+
2739 meta = with stdenv.lib; {
2840 description = "A tool to edit resource files (BRF)";
2941 homepage = "https://github.com/cfcohen/openbrf";