nixpkgs/pkgs/development/tools/misc/gdbgui/default.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, python27Packages, gdb, pkgs }:
let
deps = import ./requirements.nix { inherit pkgs; };
in
python27Packages.buildPythonApplication rec {
2018-02-03 09:39:55 +00:00
pname = "gdbgui";
2018-07-20 15:16:33 +01:00
version = "0.13.0.0";
2018-02-03 09:39:55 +00:00
buildInputs = [ gdb ];
propagatedBuildInputs = builtins.attrValues deps.packages;
src = python27Packages.fetchPypi {
inherit pname version;
2018-07-20 15:16:33 +01:00
sha256 = "16a46kabhfqsgsks5l25kpgrvrkdah3h5f5m6ams2z9nzbrxl8bz";
2018-02-03 09:39:55 +00:00
};
postPatch = ''
echo ${version} > gdbgui/VERSION.txt
'';
postInstall = ''
wrapProgram $out/bin/gdbgui \
--prefix PATH : ${stdenv.lib.makeBinPath [ gdb ]}
'';
# make /etc/protocols accessible to fix socket.getprotobyname('tcp') in sandbox
preCheck = stdenv.lib.optionalString stdenv.isLinux ''
export NIX_REDIRECTS=/etc/protocols=${pkgs.iana-etc}/etc/protocols \
LD_PRELOAD=${pkgs.libredirect}/lib/libredirect.so
'';
postCheck = stdenv.lib.optionalString stdenv.isLinux ''
unset NIX_REDIRECTS LD_PRELOAD
'';
meta = with stdenv.lib; {
description = "A browser-based frontend for GDB";
license = licenses.gpl3;
platforms = platforms.unix;
maintainers = with maintainers; [ yrashk ];
};
}