nixpkgs/pkgs/development/python-modules/base2048/default.nix
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

56 lines
1.1 KiB
Nix

{
lib,
stdenv,
buildPythonPackage,
cargo,
fetchFromGitHub,
frelatage,
libiconv,
pytestCheckHook,
rustc,
rustPlatform,
}:
buildPythonPackage rec {
pname = "base2048";
version = "0.1.3";
pyproject = true;
src = fetchFromGitHub {
owner = "ionite34";
repo = "base2048";
tag = "v${version}";
hash = "sha256-OXlfycJB1IrW2Zq0xPDGjjwCdRTWtX/ixPGWcd+YjAg=";
};
cargoDeps = rustPlatform.importCargoLock { lockFile = ./Cargo.lock; };
postPatch = ''
ln -s ${./Cargo.lock} Cargo.lock
'';
nativeBuildInputs = [
cargo
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
rustc
];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
optional-dependencies = {
fuzz = [ frelatage ];
};
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "base2048" ];
meta = {
description = "Binary encoding with base-2048 in Python with Rust";
homepage = "https://github.com/ionite34/base2048";
changelog = "https://github.com/ionite34/base2048/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}