Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib, stdenv, fetchsvn, imake, bison, flex, xorg }:
2
3stdenv.mkDerivation rec {
4 pname = "xspim";
5 version = "9.1.22";
6
7 src = fetchsvn {
8 url = "https://svn.code.sf.net/p/spimsimulator/code/";
9 rev = "r739";
10 sha256 = "1kazfgrbmi4xq7nrkmnqw1280rhdyc1hmr82flrsa3g1b1rlmj1s";
11 };
12
13 nativeBuildInputs = [ imake bison flex ];
14 buildInputs = [
15 xorg.libICE
16 xorg.libSM
17 xorg.libX11
18 xorg.libXaw
19 xorg.libXext
20 xorg.libXmu
21 xorg.libXpm
22 xorg.libXt
23 ];
24
25 preConfigure = ''
26 cd xspim
27 xmkmf
28 '';
29
30 makeFlags = [
31 "BIN_DIR=${placeholder "out"}/bin"
32 "EXCEPTION_DIR=${placeholder "out"}/share/spim"
33 "MAN_DIR=${placeholder "out"}/share/man/man1"
34 ];
35
36 doCheck = true;
37 preCheck = ''
38 pushd ../spim
39 '';
40 postCheck = ''
41 popd
42 '';
43
44 preInstall = ''
45 mkdir -p $out/share/spim
46 install -D ../spim/spim $out/bin/spim
47 install -D ../Documentation/spim.man $out/share/man/man1/spim.1
48 install -D ../Documentation/xspim.man $out/share/man/man1/xspim.1
49 '';
50
51 meta = with lib; {
52 description = "A MIPS32 simulator";
53 homepage = "https://spimsimulator.sourceforge.net/";
54 license = licenses.bsdOriginal;
55 maintainers = with maintainers; [ emilytrau ];
56 platforms = platforms.linux;
57 };
58}