`buildDotnetModule`: add support for installing pre-release tools (#374663)
[NixPkgs.git] / pkgs / development / python-modules / base2048 / default.nix
blob8e52a0aee8f20f8e7221cc765e5c031c043c2228
2   lib,
3   stdenv,
4   buildPythonPackage,
5   cargo,
6   fetchFromGitHub,
7   frelatage,
8   libiconv,
9   pytestCheckHook,
10   pythonOlder,
11   rustc,
12   rustPlatform,
15 buildPythonPackage rec {
16   pname = "base2048";
17   version = "0.1.3";
18   pyproject = true;
20   disabled = pythonOlder "3.7";
22   src = fetchFromGitHub {
23     owner = "ionite34";
24     repo = "base2048";
25     tag = "v${version}";
26     hash = "sha256-OXlfycJB1IrW2Zq0xPDGjjwCdRTWtX/ixPGWcd+YjAg=";
27   };
29   cargoDeps = rustPlatform.importCargoLock { lockFile = ./Cargo.lock; };
31   postPatch = ''
32     ln -s ${./Cargo.lock} Cargo.lock
33   '';
35   nativeBuildInputs = [
36     cargo
37     rustPlatform.cargoSetupHook
38     rustPlatform.maturinBuildHook
39     rustc
40   ];
42   buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
44   optional-dependencies = {
45     fuzz = [ frelatage ];
46   };
48   nativeCheckInputs = [ pytestCheckHook ];
50   pythonImportsCheck = [ "base2048" ];
52   meta = with lib; {
53     description = "Binary encoding with base-2048 in Python with Rust";
54     homepage = "https://github.com/ionite34/base2048";
55     changelog = "https://github.com/ionite34/base2048/releases/tag/v${version}";
56     license = licenses.mit;
57     maintainers = with maintainers; [ fab ];
58   };