3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/rawkit/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

37 lines
852 B
Nix

{ lib, stdenv, fetchPypi, buildPythonPackage, fetchpatch
, libraw
, pytest, mock }:
buildPythonPackage rec {
pname = "rawkit";
version = "0.6.0";
src = fetchPypi {
inherit pname version;
sha256 = "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s";
};
patches = [
# Python 3.7 compatibility
(fetchpatch {
url = "https://github.com/photoshell/rawkit/commit/663e90afa835d398aedd782c87b8cd0bff64bc9f.patch";
sha256 = "1cdw0x9bgk0b5jnpjnmd8jpbaryarr3cjqizq44366qh3l0jycxy";
})
];
buildInputs = [ libraw ];
checkInputs = [ pytest mock ];
checkPhase = ''
py.test tests
'';
meta = with lib; {
description = "CTypes based LibRaw bindings for Python";
homepage = "https://rawkit.readthedocs.org/";
license = licenses.mit;
maintainers = with maintainers; [ jfrankenau ];
};
}