mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-13 16:53:53 +00:00
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
100 lines
2.0 KiB
Nix
100 lines
2.0 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
fetchFromGitHub,
|
|
|
|
# build-system
|
|
setuptools,
|
|
|
|
# dependencies
|
|
anyqt,
|
|
cachecontrol,
|
|
commonmark,
|
|
dictdiffer,
|
|
docutils,
|
|
filelock,
|
|
lockfile,
|
|
numpy,
|
|
pip,
|
|
qasync,
|
|
requests-cache,
|
|
typing-extensions,
|
|
|
|
# tests
|
|
qt5,
|
|
pytest-qt,
|
|
pytestCheckHook,
|
|
|
|
stdenv,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "orange-canvas-core";
|
|
version = "0.2.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "biolab";
|
|
repo = "orange-canvas-core";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-Jp3vCQmRdkFADStVkbCFPiCBqpbI0a4JiJ8qs60rpqw=";
|
|
};
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [
|
|
anyqt
|
|
cachecontrol
|
|
commonmark
|
|
dictdiffer
|
|
docutils
|
|
filelock
|
|
lockfile
|
|
numpy
|
|
pip
|
|
qasync
|
|
requests-cache
|
|
typing-extensions
|
|
];
|
|
|
|
pythonImportsCheck = [ "orangecanvas" ];
|
|
|
|
preCheck = ''
|
|
export HOME=$(mktemp -d)
|
|
export QT_PLUGIN_PATH="${qt5.qtbase.bin}/${qt5.qtbase.qtPluginPrefix}"
|
|
export QT_QPA_PLATFORM_PLUGIN_PATH="${qt5.qtbase.bin}/lib/qt-${qt5.qtbase.version}/plugins";
|
|
export QT_QPA_PLATFORM=offscreen
|
|
'';
|
|
|
|
nativeCheckInputs = [
|
|
pytest-qt
|
|
pytestCheckHook
|
|
];
|
|
|
|
disabledTests = [
|
|
# Failed: CALL ERROR: Exceptions caught in Qt event loop
|
|
"test_create_new_window"
|
|
"test_dont_load_swp_on_new_window"
|
|
"test_editlinksnode"
|
|
"test_flattened"
|
|
"test_links_edit"
|
|
"test_links_edit_widget"
|
|
"test_new_window"
|
|
"test_toolbox"
|
|
"test_tooltree_registry"
|
|
"test_widgettoolgrid"
|
|
];
|
|
|
|
disabledTestPaths = [ "orangecanvas/canvas/items/tests/test_graphicstextitem.py" ];
|
|
|
|
meta = {
|
|
description = "Orange framework for building graphical user interfaces for editing workflows";
|
|
homepage = "https://github.com/biolab/orange-canvas-core";
|
|
changelog = "https://github.com/biolab/orange-canvas-core/releases/tag/${version}";
|
|
license = [ lib.licenses.gpl3 ];
|
|
maintainers = [ lib.maintainers.lucasew ];
|
|
# Segmentation fault during tests
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
};
|
|
}
|