diff options
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r-- | pkgs/development/tools/misc/ddd/default.nix | 12 | ||||
-rw-r--r-- | pkgs/development/tools/misc/qtspim/default.nix | 61 | ||||
-rw-r--r-- | pkgs/development/tools/misc/xspim/default.nix | 49 | ||||
-rw-r--r-- | pkgs/development/tools/misc/xxgdb/default.nix | 43 | ||||
-rw-r--r-- | pkgs/development/tools/misc/xxgdb/xxgdb-pty.patch | 84 |
5 files changed, 247 insertions, 2 deletions
diff --git a/pkgs/development/tools/misc/ddd/default.nix b/pkgs/development/tools/misc/ddd/default.nix index ca50deb504d..ecb198d7248 100644 --- a/pkgs/development/tools/misc/ddd/default.nix +++ b/pkgs/development/tools/misc/ddd/default.nix @@ -10,14 +10,22 @@ stdenv.mkDerivation rec { buildInputs = [motif ncurses libX11 libXt]; configureFlags = [ "--with-x" ]; - patches = [ ./gcc44.patch ]; + patches = [ + # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504868 + ./gcc44.patch + ]; NIX_CFLAGS_COMPILE = "-fpermissive"; + postInstall = '' + install -D icons/ddd.xpm $out/share/pixmaps/ddd.xpm + ''; + meta = { homepage = "https://www.gnu.org/software/ddd"; description = "Graphical front-end for command-line debuggers"; - license = lib.licenses.gpl2; + license = lib.licenses.gpl3Plus; platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ angustrau ]; }; } diff --git a/pkgs/development/tools/misc/qtspim/default.nix b/pkgs/development/tools/misc/qtspim/default.nix new file mode 100644 index 00000000000..23d33a9f81c --- /dev/null +++ b/pkgs/development/tools/misc/qtspim/default.nix @@ -0,0 +1,61 @@ +{ lib, stdenv, fetchsvn, wrapQtAppsHook, qtbase, qttools, qmake, bison, flex, ... }: +stdenv.mkDerivation rec { + pname = "qtspim"; + version = "9.1.22"; + + src = fetchsvn { + url = "https://svn.code.sf.net/p/spimsimulator/code/"; + rev = "r739"; + sha256 = "1kazfgrbmi4xq7nrkmnqw1280rhdyc1hmr82flrsa3g1b1rlmj1s"; + }; + + postPatch = '' + cd QtSpim + + # Patches from https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=qtspim + sed -i 's/zero_imm/is_zero_imm/g' parser_yacc.cpp + sed -i 's/^int data_dir/bool data_dir/g' parser_yacc.cpp + sed -i 's/^int text_dir/bool text_dir/g' parser_yacc.cpp + sed -i 's/^int parse_error_occurred/bool parse_error_occurred/g' parser_yacc.cpp + + substituteInPlace QtSpim.pro --replace /usr/lib/qtspim/lib $out/lib + substituteInPlace menu.cpp \ + --replace /usr/lib/qtspim/bin/assistant ${qttools.dev}/bin/assistant \ + --replace /usr/lib/qtspim/help/qtspim.qhc $out/share/help/qtspim.qhc + substituteInPlace ../Setup/qtspim_debian_deployment/qtspim.desktop \ + --replace /usr/bin/qtspim qtspim \ + --replace /usr/lib/qtspim/qtspim.png qtspim + ''; + + nativeBuildInputs = [ wrapQtAppsHook qttools qmake bison flex ]; + buildInputs = [ qtbase ]; + QT_PLUGIN_PATH = "${qtbase}/${qtbase.qtPluginPrefix}"; + + qmakeFlags = [ + "QtSpim.pro" + "-spec" + "linux-g++" + "CONFIG+=release" + ]; + + installPhase = '' + runHook preInstall + + install -D QtSpim $out/bin/qtspim + install -D ../Setup/qtspim_debian_deployment/copyright $out/share/licenses/qtspim/copyright + install -D ../Setup/qtspim_debian_deployment/qtspim.desktop $out/share/applications/qtspim.desktop + install -D ../Setup/NewIcon48x48.png $out/share/icons/hicolor/48x48/apps/qtspim.png + install -D ../Setup/NewIcon256x256.png $out/share/icons/hicolor/256x256/apps/qtspim.png + cp -r help $out/share/help + + runHook postInstall + ''; + + meta = with lib; { + description = "New user interface for spim, a MIPS simulator"; + homepage = "http://spimsimulator.sourceforge.net/"; + license = licenses.bsdOriginal; + maintainers = with maintainers; [ angustrau ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/development/tools/misc/xspim/default.nix b/pkgs/development/tools/misc/xspim/default.nix new file mode 100644 index 00000000000..2e6e3e3eb10 --- /dev/null +++ b/pkgs/development/tools/misc/xspim/default.nix @@ -0,0 +1,49 @@ +{ lib, stdenv, fetchsvn, imake, bison, flex, xlibsWrapper, libXaw, libXpm, ... }: + +stdenv.mkDerivation rec { + pname = "xspim"; + version = "9.1.22"; + + src = fetchsvn { + url = "https://svn.code.sf.net/p/spimsimulator/code/"; + rev = "r739"; + sha256 = "1kazfgrbmi4xq7nrkmnqw1280rhdyc1hmr82flrsa3g1b1rlmj1s"; + }; + + nativeBuildInputs = [ imake bison flex ]; + buildInputs = [ xlibsWrapper libXaw libXpm ]; + + preConfigure = '' + cd xspim + xmkmf + ''; + + makeFlags = [ + "BIN_DIR=${placeholder "out"}/bin" + "EXCEPTION_DIR=${placeholder "out"}/share/spim" + "MAN_DIR=${placeholder "out"}/share/man/man1" + ]; + + doCheck = true; + preCheck = '' + pushd ../spim + ''; + postCheck = '' + popd + ''; + + preInstall = '' + mkdir -p $out/share/spim + install -D ../spim/spim $out/bin/spim + install -D ../Documentation/spim.man $out/share/man/man1/spim.1 + install -D ../Documentation/xspim.man $out/share/man/man1/xspim.1 + ''; + + meta = with lib; { + description = "A MIPS32 simulator"; + homepage = "http://spimsimulator.sourceforge.net/"; + license = licenses.bsdOriginal; + maintainers = with maintainers; [ angustrau ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/development/tools/misc/xxgdb/default.nix b/pkgs/development/tools/misc/xxgdb/default.nix new file mode 100644 index 00000000000..fc0a38ee749 --- /dev/null +++ b/pkgs/development/tools/misc/xxgdb/default.nix @@ -0,0 +1,43 @@ +{ lib, stdenv, fetchurl, imake, xlibsWrapper, gccmakedep, libXaw }: + +stdenv.mkDerivation rec { + pname = "xxgdb"; + version = "1.12"; + + src = fetchurl { + url = "http://deb.debian.org/debian/pool/main/x/xxgdb/xxgdb_${version}.orig.tar.gz"; + sha256 = "0jwazg99wk2l7r390ggw0yr8xipl07bp0qynni141xss530i6d1a"; + }; + + patches = [ + # http://zhu-qy.blogspot.com.es/2012/11/slackware-14-i-still-got-xxgdb-all-ptys.html + ./xxgdb-pty.patch + ]; + + nativeBuildInputs = [ imake gccmakedep ]; + buildInputs = [ xlibsWrapper libXaw ]; + + preConfigure = '' + mkdir build + xmkmf + ''; + + makeFlags = [ + "DESTDIR=build" + ]; + + postInstall = '' + # Fix up install paths + shopt -s globstar + mv build/**/bin $out/bin + + install -D xxgdb.1 $out/share/man/man1/xxgdb.1 + ''; + + meta = with lib; { + description = "A simple but powerful graphical interface to gdb"; + license = licenses.mit; + maintainers = with maintainers; [ angustrau ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/development/tools/misc/xxgdb/xxgdb-pty.patch b/pkgs/development/tools/misc/xxgdb/xxgdb-pty.patch new file mode 100644 index 00000000000..735bb1b0b5f --- /dev/null +++ b/pkgs/development/tools/misc/xxgdb/xxgdb-pty.patch @@ -0,0 +1,84 @@ +--- xxgdb-1.12-org/calldbx.c 2012-10-26 17:17:49.810750909 -0700 ++++ xxgdb-1.12/calldbx.c 2012-10-26 17:53:59.209918816 -0700 +@@ -69,6 +69,12 @@ + * create_io_window(): create an io window for gdb to use + */ + ++#ifdef linux ++#ifndef _GNU_SOURCE ++#define _GNU_SOURCE ++#endif ++#endif ++ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +@@ -126,6 +132,13 @@ + { + int master; + ++#ifdef _POSIX_SOURCE ++ if ((master = posix_openpt (O_RDWR|O_NOCTTY)) < 0) { ++ perror("posix_openpt failed:"); ++ } else { ++ return master; ++ } ++#else + #ifdef SVR4 /* (MJH) Use STREAMS */ + + if((master = open(MASTER_CLONE, O_RDWR)) < 0) +@@ -152,6 +165,7 @@ + } + #endif + #endif /* SVR4 */ ++#endif /* _POSIX_SOURCE */ + + #ifdef GDB + fprintf(stderr, "xxgdb: all ptys in use\n"); +@@ -167,7 +181,28 @@ + { + int slave; + +-#ifdef SVR4 /* (MJH) */ ++#ifdef _POSIX_SOURCE ++ char *slave_name = ptsname (master); ++ if (slave_name == NULL) { ++ perror ("Pseudo-tty slave"); ++ exit (2); ++ } // end if ++ if (grantpt (master) < 0) { ++ perror ("grantpt error"); ++ exit (3); ++ } ++ if (unlockpt (master) < 0) { ++ perror ("unlockpt error"); ++ exit (4); ++ } ++ if ((slave = open (slave_name, O_RDWR)) < 0) { ++ perror (slave_name); ++ exit (5); ++ } // end if ++ return slave; ++#else ++#ifdef SVR4 ++ /* (MJH) */ + char *slave_name = "unknown"; + extern char *ptsname(int master); + void (*handler)(); +@@ -194,6 +229,7 @@ + } + return slave; + #endif /* SVR4 */ ++#endif /* _POSIX_SOURCE */ + } + + #ifdef CREATE_IO_WINDOW +@@ -230,7 +266,7 @@ + { + /* child */ + /* printf("xterm xterm -l -e xxgdbiowin\n");*/ +- if (execlp("xterm", "xterm", "-e", "xxgdbiowin", 0)) ++ if (execlp("xterm", "xterm", "-e", "xxgdbiowin", NULL)) + { + printf("exec of 'xterm -e xxgdbiowin' fails\n"); + unlink("/tmp/iowindowtty"); |