biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / development / tools / misc / qtspim / default.nix
blob15fd8dd13b2c786481eef9b5c100371001542ff3
1 { lib, stdenv, fetchsvn, wrapQtAppsHook, qtbase, qttools, qmake, bison, flex, ... }:
2 stdenv.mkDerivation rec {
3   pname = "qtspim";
4   version = "9.1.23";
6   src = fetchsvn {
7     url = "https://svn.code.sf.net/p/spimsimulator/code/";
8     rev = "r749";
9     sha256 = "0iazl7mlcilrdbw8gb98v868a8ldw2lmkn1xs8hnfvr93l6aj0rp";
10   };
12   postPatch = ''
13     cd QtSpim
15     substituteInPlace QtSpim.pro --replace /usr/lib/qtspim/lib $out/lib
16     substituteInPlace menu.cpp \
17       --replace /usr/lib/qtspim/bin/assistant ${qttools.dev}/bin/assistant \
18       --replace /usr/lib/qtspim/help/qtspim.qhc $out/share/help/qtspim.qhc
19     substituteInPlace ../Setup/qtspim_debian_deployment/qtspim.desktop \
20       --replace /usr/bin/qtspim qtspim \
21       --replace /usr/lib/qtspim/qtspim.png qtspim
22   '';
24   nativeBuildInputs = [ wrapQtAppsHook qttools qmake bison flex ];
25   buildInputs = [ qtbase ];
26   QT_PLUGIN_PATH = "${qtbase}/${qtbase.qtPluginPrefix}";
28   qmakeFlags = [
29     "QtSpim.pro"
30     "-spec"
31     "linux-g++"
32     "CONFIG+=release"
33   ];
35   installPhase = ''
36     runHook preInstall
38     install -D QtSpim $out/bin/qtspim
39     install -D ../Setup/qtspim_debian_deployment/copyright $out/share/licenses/qtspim/copyright
40     install -D ../Setup/qtspim_debian_deployment/qtspim.desktop $out/share/applications/qtspim.desktop
41     install -D ../Setup/NewIcon48x48.png $out/share/icons/hicolor/48x48/apps/qtspim.png
42     install -D ../Setup/NewIcon256x256.png $out/share/icons/hicolor/256x256/apps/qtspim.png
43     cp -r help $out/share/help
45     runHook postInstall
46   '';
48   meta = with lib; {
49     description = "New user interface for spim, a MIPS simulator";
50     mainProgram = "qtspim";
51     homepage = "https://spimsimulator.sourceforge.net/";
52     license = licenses.bsdOriginal;
53     maintainers = with maintainers; [ emilytrau ];
54     platforms = platforms.linux;
55   };