nixpkgs/pkgs/development/tools/winpdb/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

52 lines
1.6 KiB
Nix

{ lib, stdenv, fetchurl, pythonPackages, makeDesktopItem }:
pythonPackages.buildPythonApplication rec {
name = "winpdb-1.4.8";
namePrefix = "";
src = fetchurl {
url = "https://winpdb.googlecode.com/files/${name}.tar.gz";
sha256 = "0vkpd24r40j928vc04c721innv0168sbllg97v4zw10adm24d8fs";
};
propagatedBuildInputs = [ pythonPackages.wxPython ];
desktopItem = makeDesktopItem {
name = "winpdb";
exec = "winpdb";
icon = "winpdb";
comment = "Platform independend Python debugger";
desktopName = "Winpdb";
genericName = "Python Debugger";
categories = "Development;Debugger;";
};
# Don't call gnome-terminal with "--disable-factory" flag, which is
# unsupported since GNOME >= 3.10. Apparently, debian also does this fix:
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757718
postPatch = ''
sed -i "s/--disable-factory//" rpdb2.py
'';
postInstall = ''
mkdir -p "$out"/share/applications
cp "$desktopItem"/share/applications/* "$out"/share/applications/
mkdir -p "$out"/share/icons
cp artwork/winpdb-icon.svg "$out"/share/icons/winpdb.svg
'';
meta = with lib; {
description = "Platform independent Python debugger";
longDescription = ''
Winpdb is a platform independent GPL Python debugger with support for
multiple threads, namespace modification, embedded debugging, encrypted
communication and is up to 20 times faster than pdb.
'';
homepage = "http://winpdb.org/";
license = licenses.gpl2Plus;
platforms = platforms.all;
maintainers = [ maintainers.bjornfor ];
};
}