1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/python-modules/livereload/default.nix

43 lines
977 B
Nix
Raw Normal View History

{ lib
, buildPythonPackage
2017-10-01 11:00:26 +01:00
, fetchFromGitHub
, nose
, django
, tornado
, six
2017-10-01 11:00:26 +01:00
, pytest
}:
buildPythonPackage rec {
pname = "livereload";
version = "2.6.0";
2017-10-01 11:00:26 +01:00
src = fetchFromGitHub {
owner = "lepture";
repo = "python-livereload";
rev = "v${version}";
sha256 = "0p3yvvr1iv3fv3pwc2qfzl3mi3b5zv6dh7kmfm1k7krxvganj87n";
};
buildInputs = [ nose django ];
propagatedBuildInputs = [ tornado six ];
# Remove this patch when PR merged
# https://github.com/lepture/python-livereload/pull/173
postPatch = ''
substituteInPlace tests/test_watcher.py \
--replace 'watcher.watch(filepath, add_count)' \
'add_count.repr_str = "add_count test task"; watcher.watch(filepath, add_count)'
'';
2017-10-01 11:00:26 +01:00
checkInputs = [ pytest ];
checkPhase = "pytest tests";
meta = {
description = "Runs a local server that reloads as you develop";
homepage = "https://github.com/lepture/python-livereload";
license = lib.licenses.bsd3;
};
}