ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / discid / default.nix
blob1c24402926f37217bd9f313e205f6238a9d36228
1 { lib, stdenv, libdiscid, buildPythonPackage, fetchPypi }:
3 buildPythonPackage rec {
4   pname = "discid";
5   version = "1.2.0";
7   src = fetchPypi {
8     inherit pname version;
9     sha256 = "1fc6kvnqwaz9lrs2qgsp8wh0nabf49010r0r53wnsmpmafy315nd";
10   };
12   patchPhase =
13     let extension = stdenv.hostPlatform.extensions.sharedLibrary; in
14     ''
15       substituteInPlace discid/libdiscid.py \
16         --replace "_open_library(_LIB_NAME)" \
17                   "_open_library('${libdiscid}/lib/libdiscid${extension}')"
18     '';
20   meta = with lib; {
21     description = "Python binding of libdiscid";
22     homepage    = "https://python-discid.readthedocs.org/";
23     license     = licenses.lgpl3Plus;
24   };