Merge remote-tracking branch 'origin/master' into staging-next
Fix cargo-flash build
This commit is contained in:
@@ -1,79 +1,112 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, aiohttp
|
||||
, Babel
|
||||
, blinker
|
||||
, buildPythonPackage
|
||||
, isPy3k
|
||||
, fetchPypi
|
||||
, doit
|
||||
, glibcLocales
|
||||
, pytest
|
||||
, pytestcov
|
||||
, mock
|
||||
, pygments
|
||||
, pillow
|
||||
, dateutil
|
||||
, docutils
|
||||
, Mako
|
||||
, unidecode
|
||||
, lxml
|
||||
, Yapsy
|
||||
, PyRSS2Gen
|
||||
, Logbook
|
||||
, blinker
|
||||
, natsort
|
||||
, requests
|
||||
, piexif
|
||||
, markdown
|
||||
, phpserialize
|
||||
, jinja2
|
||||
, Babel
|
||||
, doit
|
||||
, fetchPypi
|
||||
, freezegun
|
||||
, toml
|
||||
, ghp-import
|
||||
, hsluv
|
||||
, html5lib
|
||||
, ipykernel
|
||||
, jinja2
|
||||
, lxml
|
||||
, Mako
|
||||
, markdown
|
||||
, micawber
|
||||
, mock
|
||||
, natsort
|
||||
, notebook
|
||||
, phpserialize
|
||||
, piexif
|
||||
, pillow
|
||||
, pygal
|
||||
, pygments
|
||||
, pyphen
|
||||
, PyRSS2Gen
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, requests
|
||||
, ruamel_yaml
|
||||
, aiohttp
|
||||
, stdenv
|
||||
, toml
|
||||
, typogrify
|
||||
, unidecode
|
||||
, watchdog
|
||||
, Yapsy
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "Nikola";
|
||||
version = "8.1.3";
|
||||
|
||||
# Nix contains only Python 3 supported version of doit, which is a dependency
|
||||
# of Nikola. Python 2 support would require older doit 0.29.0 (which on the
|
||||
# other hand doesn't support Python 3.3). So, just disable Python 2.
|
||||
disabled = !isPy3k;
|
||||
|
||||
checkInputs = [ pytest pytestcov mock glibcLocales freezegun ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
# requirements.txt
|
||||
doit pygments pillow dateutil docutils Mako markdown unidecode
|
||||
lxml Yapsy PyRSS2Gen Logbook blinker natsort requests piexif Babel
|
||||
# requirements-extras.txt
|
||||
phpserialize jinja2 toml notebook ruamel_yaml aiohttp watchdog
|
||||
];
|
||||
disabled = pythonOlder "3.5";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "05eac356bb4273cdd05d2dd6ad676226133496c457af91987c3f0d40e2fe57ef";
|
||||
};
|
||||
|
||||
patchPhase = ''
|
||||
# upstream added bound so that requires.io doesn't send mails about update
|
||||
# nikola should work with markdown 3.0: https://github.com/getnikola/nikola/pull/3175#issue-220147596
|
||||
sed -i 's/Markdown>.*/Markdown/' requirements.txt
|
||||
propagatedBuildInputs = [
|
||||
aiohttp
|
||||
Babel
|
||||
blinker
|
||||
dateutil
|
||||
docutils
|
||||
doit
|
||||
ghp-import
|
||||
hsluv
|
||||
html5lib
|
||||
ipykernel
|
||||
jinja2
|
||||
lxml
|
||||
Mako
|
||||
markdown
|
||||
micawber
|
||||
natsort
|
||||
notebook
|
||||
phpserialize
|
||||
piexif
|
||||
pillow
|
||||
pygal
|
||||
pygments
|
||||
pyphen
|
||||
PyRSS2Gen
|
||||
requests
|
||||
ruamel_yaml
|
||||
toml
|
||||
typogrify
|
||||
unidecode
|
||||
watchdog
|
||||
Yapsy
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
freezegun
|
||||
mock
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "--cov nikola --cov-report term-missing" ""
|
||||
'';
|
||||
|
||||
checkPhase = ''
|
||||
LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" py.test .
|
||||
'';
|
||||
disabledTests = [
|
||||
# AssertionError
|
||||
"test_compiling_markdown"
|
||||
];
|
||||
|
||||
meta = {
|
||||
pythonImportsCheck = [ "nikola" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Static website and blog generator";
|
||||
homepage = "https://getnikola.com/";
|
||||
description = "A modular, fast, simple, static website and blog generator";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ jluttine ];
|
||||
# all tests fail
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ jluttine ];
|
||||
# All tests fail
|
||||
broken = stdenv.isDarwin;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -17,6 +17,12 @@ buildPythonApplication rec {
|
||||
};
|
||||
|
||||
checkInputs = [ pytestCheckHook mock pathpy pyhamcrest pytest-html ];
|
||||
|
||||
# upstream tests are failing, so instead we only check if we can import it
|
||||
doCheck = false;
|
||||
|
||||
pythonImportsCheck = [ "behave" ];
|
||||
|
||||
buildInputs = [ glibcLocales ];
|
||||
propagatedBuildInputs = [ colorama cucumber-tag-expressions parse parse-type six ];
|
||||
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "hsluv";
|
||||
version = "5.0.2";
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "hsluv";
|
||||
repo = "hsluv-python";
|
||||
rev = "v${version}";
|
||||
sha256 = "0r0w8ycjwfg3pmzjghzrs0lkam93fzvgiqvrwh3nl9jnqlpw7v7j";
|
||||
};
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "hsluv" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python implementation of HSLuv";
|
||||
homepage = "https://github.com/hsluv/hsluv-python";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab ];
|
||||
};
|
||||
}
|
||||
@@ -8,14 +8,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyupgrade";
|
||||
version = "2.12.0";
|
||||
version = "2.16.0";
|
||||
disabled = isPy27;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "asottile";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-pAZszyv7jXEwtQYzEk5Zq2ULP0K2vX0y6IvR6wYsJ9c=";
|
||||
sha256 = "sha256-U1Ak0oGy0FxBMqRM2A3N7VuNDz2aUW4FFW+hKKhjfdk=";
|
||||
};
|
||||
|
||||
checkInputs = [ pytestCheckHook ];
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, fetchurl
|
||||
, isPy37
|
||||
, isPy38
|
||||
, isPy39
|
||||
, patchelf
|
||||
, pillow
|
||||
, python
|
||||
, pytorch-bin
|
||||
}:
|
||||
|
||||
let
|
||||
pyVerNoDot = builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
|
||||
srcs = import ./binary-hashes.nix version;
|
||||
unsupported = throw "Unsupported system";
|
||||
version = "0.9.1";
|
||||
in buildPythonPackage {
|
||||
inherit version;
|
||||
|
||||
pname = "torchvision";
|
||||
|
||||
format = "wheel";
|
||||
|
||||
src = fetchurl srcs."${stdenv.system}-${pyVerNoDot}" or unsupported;
|
||||
|
||||
disabled = !(isPy37 || isPy38 || isPy39);
|
||||
|
||||
nativeBuildInputs = [
|
||||
patchelf
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
pillow
|
||||
pytorch-bin
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "torchvision" ];
|
||||
|
||||
postFixup = let
|
||||
rpath = lib.makeLibraryPath [ stdenv.cc.cc.lib ];
|
||||
in ''
|
||||
# Note: after patchelf'ing, libcudart can still not be found. However, this should
|
||||
# not be an issue, because PyTorch is loaded before torchvision and brings
|
||||
# in the necessary symbols.
|
||||
patchelf --set-rpath "${rpath}:${pytorch-bin}/${python.sitePackages}/torch/lib:" \
|
||||
"$out/${python.sitePackages}/torchvision/_C.so"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "PyTorch vision library";
|
||||
homepage = "https://pytorch.org/";
|
||||
changelog = "https://github.com/pytorch/vision/releases/tag/v${version}";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ danieldk ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
# Warning: use the same CUDA version as pytorch-bin.
|
||||
#
|
||||
# Precompiled wheels can be found at:
|
||||
# https://download.pytorch.org/whl/torch_stable.html
|
||||
|
||||
version: {
|
||||
x86_64-linux-37 = {
|
||||
name = "torchvision-${version}-cp37-cp37m-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu111/torchvision-${version}%2Bcu111-cp37-cp37m-linux_x86_64.whl";
|
||||
hash = "sha256-7EMVB8KZg2I3P4RqnIVk/7OOAPA1OWOipns58cSCUrw=";
|
||||
};
|
||||
x86_64-linux-38 = {
|
||||
name = "torchvision-${version}-cp38-cp38-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu111/torchvision-${version}%2Bcu111-cp38-cp38-linux_x86_64.whl";
|
||||
hash = "sha256-VjsCBW9Lusr4aDQLqaFh5dpV/5ZJ5PDs7nY4CbCHDTA=";
|
||||
};
|
||||
x86_64-linux-39 = {
|
||||
name = "torchvision-${version}-cp39-cp39-linux_x86_64.whl";
|
||||
url = "https://download.pytorch.org/whl/cu111/torchvision-${version}%2Bcu111-cp39-cp39-linux_x86_64.whl";
|
||||
hash = "sha256-pzR7TBE+WcAmozskoeOVBuMkGJf9tvsaXsUkTcu86N8=";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user