nixpkgs/pkgs/applications/misc/plover/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

56 lines
1.7 KiB
Nix

{ lib, stdenv, fetchurl, python27Packages, python36Packages, wmctrl,
qtbase, mkDerivationWith }:
{
stable = with python27Packages; buildPythonPackage rec {
pname = "plover";
version = "3.1.1";
meta = with lib; {
description = "OpenSteno Plover stenography software";
maintainers = with maintainers; [ twey kovirobi ];
license = licenses.gpl2;
};
src = fetchurl {
url = "https://github.com/openstenoproject/plover/archive/v${version}.tar.gz";
sha256 = "1hdg5491phx6svrxxsxp8v6n4b25y7y4wxw7x3bxlbyhaskgj53r";
};
nativeBuildInputs = [ setuptools_scm ];
buildInputs = [ pytest mock ];
propagatedBuildInputs = [
six setuptools pyserial appdirs hidapi wxPython xlib wmctrl dbus-python
];
};
dev = with python36Packages; mkDerivationWith buildPythonPackage rec {
pname = "plover";
version = "4.0.0.dev8";
meta = with lib; {
description = "OpenSteno Plover stenography software";
maintainers = with maintainers; [ twey kovirobi ];
license = licenses.gpl2;
};
src = fetchurl {
url = "https://github.com/openstenoproject/plover/archive/v${version}.tar.gz";
sha256 = "1wxkmik1zyw5gqig5r0cas5v6f5408fbnximzw610rdisqy09rxp";
};
# I'm not sure why we don't find PyQt5 here but there's a similar
# sed on many of the platforms Plover builds for
postPatch = "sed -i /PyQt5/d setup.cfg";
checkInputs = [ pytest mock ];
propagatedBuildInputs = [ Babel pyqt5 xlib pyserial appdirs wcwidth setuptools ];
dontWrapQtApps = true;
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
};
}