mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-05 12:34:00 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
51 lines
1.1 KiB
Nix
51 lines
1.1 KiB
Nix
{ lib
|
|
, python3
|
|
, fetchPypi
|
|
}:
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
pname = "markdown-anki-decks";
|
|
version = "1.1.1";
|
|
pyproject = true;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-SvKjjE629OwxWsPo2egGf2K6GzlWAYYStarHhA4Ex0w=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace pyproject.toml \
|
|
--replace-fail 'typer = "^0.4.0"' 'typer = "*"'
|
|
'';
|
|
|
|
build-system = with python3.pkgs; [
|
|
poetry-core
|
|
];
|
|
|
|
dependencies = with python3.pkgs; [
|
|
beautifulsoup4
|
|
colorama
|
|
genanki
|
|
markdown
|
|
python-frontmatter
|
|
typer
|
|
];
|
|
|
|
# No tests available on PyPI and there is only a failing version assertion test in the repo.
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [
|
|
"markdown_anki_decks"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Tool to convert Markdown files into Anki Decks";
|
|
homepage = "https://github.com/lukesmurray/markdown-anki-decks";
|
|
changelog = "https://github.com/lukesmurray/markdown-anki-decks/blob/${version}/CHANGELOG.md";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ totoroot ];
|
|
platforms = platforms.unix;
|
|
mainProgram = "mdankideck";
|
|
};
|
|
}
|