mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 16:43:58 +00:00
e0464e4788
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" ```
61 lines
1.3 KiB
Nix
61 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
buildPythonPackage,
|
|
pythonOlder,
|
|
fetchFromGitHub,
|
|
attrs,
|
|
pillow,
|
|
toml,
|
|
numpy,
|
|
pyyaml,
|
|
python,
|
|
pytestCheckHook,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "clickgen";
|
|
version = "2.2.5";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ful1e5";
|
|
repo = "clickgen";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-yFEkE1VyeHBuebpsumc6CTvv2kpAw7XAWlyUlXibqz0=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
attrs
|
|
numpy
|
|
pillow
|
|
pyyaml
|
|
toml
|
|
];
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
postInstall = ''
|
|
# Copying scripts directory needed by clickgen script at $out/bin/
|
|
cp -R src/clickgen/scripts $out/${python.sitePackages}/clickgen/scripts
|
|
'';
|
|
|
|
pythonImportsCheck = [ "clickgen" ];
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/ful1e5/clickgen";
|
|
description = "Hassle-free cursor building toolbox";
|
|
longDescription = ''
|
|
clickgen is API for building X11 and Windows Cursors from
|
|
.png files. clickgen is using anicursorgen and xcursorgen under the hood.
|
|
'';
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ AdsonCicilioti ];
|
|
# fails with:
|
|
# ld: unknown option: -zdefs
|
|
broken = stdenv.hostPlatform.isDarwin;
|
|
};
|
|
}
|