about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pyscard/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pyscard/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pyscard/default.nix17
1 files changed, 7 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pyscard/default.nix b/nixpkgs/pkgs/development/python-modules/pyscard/default.nix
index 9798d94900b0..28c40e5ec5fc 100644
--- a/nixpkgs/pkgs/development/python-modules/pyscard/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/pyscard/default.nix
@@ -1,11 +1,8 @@
-{ stdenv, fetchPypi, buildPythonPackage, swig, pcsclite, PCSC }:
+{ lib, stdenv, fetchPypi, buildPythonPackage, swig, pcsclite, PCSC }:
 
 let
   # Package does not support configuring the pcsc library.
   withApplePCSC = stdenv.isDarwin;
-
-  inherit (stdenv.lib) getLib getDev optionalString optionals;
-  inherit (stdenv.hostPlatform.extensions) sharedLibrary;
 in
 
 buildPythonPackage rec {
@@ -24,19 +21,19 @@ buildPythonPackage rec {
   '' else ''
     substituteInPlace smartcard/scard/winscarddll.c \
       --replace "libpcsclite.so.1" \
-                "${getLib pcsclite}/lib/libpcsclite${sharedLibrary}"
+                "${lib.getLib pcsclite}/lib/libpcsclite${stdenv.hostPlatform.extensions.sharedLibrary}"
   '';
 
-  NIX_CFLAGS_COMPILE = optionalString (! withApplePCSC)
-    "-I ${getDev pcsclite}/include/PCSC";
+  NIX_CFLAGS_COMPILE = lib.optionalString (! withApplePCSC)
+    "-I ${lib.getDev pcsclite}/include/PCSC";
 
   propagatedBuildInputs = if withApplePCSC then [ PCSC ] else [ pcsclite ];
   nativeBuildInputs = [ swig ];
 
-  meta = {
+  meta = with lib; {
     homepage = "https://pyscard.sourceforge.io/";
     description = "Smartcard library for python";
-    license = stdenv.lib.licenses.lgpl21;
-    maintainers = with stdenv.lib.maintainers; [ layus ];
+    license = licenses.lgpl21;
+    maintainers = with maintainers; [ layus ];
   };
 }