uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
79
pkgs/development/python-modules/pydicom/default.nix
Normal file
79
pkgs/development/python-modules/pydicom/default.nix
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pythonOlder
|
||||
, pytestCheckHook
|
||||
, numpy
|
||||
, pillow
|
||||
, setuptools
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "pydicom";
|
||||
version = "2.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pydicom";
|
||||
repo = "pydicom";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-CAQWaBkzecJ1VXQ5BnAUjmBMjh0I8y+gT7I4P4o2gqI=";
|
||||
};
|
||||
|
||||
# Pydicom needs pydicom-data to run some tests. If these files aren't downloaded
|
||||
# before the package creation, it'll try to download during the checkPhase.
|
||||
test_data = fetchFromGitHub {
|
||||
owner = "pydicom";
|
||||
repo = "pydicom-data";
|
||||
rev = "bbb723879690bb77e077a6d57657930998e92bd5";
|
||||
hash = "sha256-dCI1temvpNWiWJYVfQZKy/YJ4ad5B0e9hEKHJnEeqzk=";
|
||||
};
|
||||
|
||||
in
|
||||
buildPythonPackage {
|
||||
inherit pname version src;
|
||||
disabled = pythonOlder "3.6";
|
||||
|
||||
format = "setuptools";
|
||||
|
||||
propagatedBuildInputs = [
|
||||
numpy
|
||||
pillow
|
||||
setuptools
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
# Setting $HOME to prevent pytest to try to create a folder inside
|
||||
# /homeless-shelter which is read-only.
|
||||
# Linking pydicom-data dicom files to $HOME/.pydicom/data
|
||||
preCheck = ''
|
||||
export HOME=$TMP/test-home
|
||||
mkdir -p $HOME/.pydicom/
|
||||
ln -s ${test_data}/data_store/data $HOME/.pydicom/data
|
||||
'';
|
||||
|
||||
disabledTests = [
|
||||
# tries to remove a dicom inside $HOME/.pydicom/data/ and download it again
|
||||
"test_fetch_data_files"
|
||||
] ++ lib.optionals stdenv.isAarch64 [
|
||||
# https://github.com/pydicom/pydicom/issues/1386
|
||||
"test_array"
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
# flaky, hard to reproduce failure outside hydra
|
||||
"test_time_check"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"pydicom"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python package for working with DICOM files";
|
||||
homepage = "https://pydicom.github.io";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ bcdarwin ];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue