mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
ced21f5e1a
The `buildPython*` function computes name from `pname` and `version`. This change removes `name` attribute from all expressions in `pkgs/development/python-modules`. While at it, some other minor changes were made as well, such as replacing `fetchurl` calls with `fetchPypi`.
30 lines
733 B
Nix
30 lines
733 B
Nix
{ lib, buildPythonPackage, fetchPypi, fontconfig, python, freefont_ttf, makeFontsConf }:
|
|
|
|
let
|
|
fontsConf = makeFontsConf {
|
|
fontDirectories = [ freefont_ttf ];
|
|
};
|
|
in buildPythonPackage rec {
|
|
pname = "Python-fontconfig";
|
|
version = "0.5.1";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
sha256 = "154rfd0ygcbj9y8m32n537b457yijpfx9dvmf76vi0rg4ikf7kxp";
|
|
};
|
|
|
|
buildInputs = [ fontconfig ];
|
|
|
|
checkPhase = ''
|
|
export FONTCONFIG_FILE=${fontsConf};
|
|
echo y | ${python.interpreter} test/test.py
|
|
'';
|
|
|
|
meta = {
|
|
homepage = https://github.com/Vayn/python-fontconfig;
|
|
description = "Python binding for Fontconfig";
|
|
license = lib.licenses.gpl3;
|
|
maintainers = with lib.maintainers; [ gnidorah ];
|
|
};
|
|
}
|