summary refs log tree commit diff
path: root/pkgs/development/python-modules/binaryornot
diff options
context:
space:
mode:
authorRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2018-02-19 17:40:17 +0100
committerRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2018-02-22 01:46:10 +0100
commit4a9a7d30368c66af9bb5e2d95c21012badd9b699 (patch)
treec5d23a0b889fcf1e3a712dc0239eb3575a87ae28 /pkgs/development/python-modules/binaryornot
parente42e6d2f0e58c4b1fcaff67d44f3fe015de689a4 (diff)
downloadnixpkgs-4a9a7d30368c66af9bb5e2d95c21012badd9b699.tar
nixpkgs-4a9a7d30368c66af9bb5e2d95c21012badd9b699.tar.gz
nixpkgs-4a9a7d30368c66af9bb5e2d95c21012badd9b699.tar.bz2
nixpkgs-4a9a7d30368c66af9bb5e2d95c21012badd9b699.tar.lz
nixpkgs-4a9a7d30368c66af9bb5e2d95c21012badd9b699.tar.xz
nixpkgs-4a9a7d30368c66af9bb5e2d95c21012badd9b699.tar.zst
nixpkgs-4a9a7d30368c66af9bb5e2d95c21012badd9b699.zip
pythonPackages.binaryornot: 0.4.0 -> 0.4.4
Diffstat (limited to 'pkgs/development/python-modules/binaryornot')
-rw-r--r--pkgs/development/python-modules/binaryornot/default.nix27
1 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/binaryornot/default.nix b/pkgs/development/python-modules/binaryornot/default.nix
new file mode 100644
index 00000000000..2f0b01a5c23
--- /dev/null
+++ b/pkgs/development/python-modules/binaryornot/default.nix
@@ -0,0 +1,27 @@
+{ lib, buildPythonPackage, fetchPypi, chardet, hypothesis }:
+
+buildPythonPackage rec {
+  pname = "binaryornot";
+  version = "0.4.4";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061";
+  };
+
+  prePatch = ''
+    # See https://github.com/audreyr/binaryornot/issues/40
+    substituteInPlace tests/test_check.py \
+      --replace "average_size=512" "average_size=128"
+  '';
+
+  propagatedBuildInputs = [ chardet ];
+
+  checkInputs = [ hypothesis ];
+
+  meta = with lib; {
+    homepage = https://github.com/audreyr/binaryornot;
+    description = "Ultra-lightweight pure Python package to check if a file is binary or text";
+    license = licenses.bsd3;
+  };
+}