nixpkgs/pkgs/by-name/pr/present/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

44 lines
1.1 KiB
Nix

{ lib, python3Packages, fetchPypi }:
let
# https://github.com/NixOS/nixpkgs/issues/348788
mistune_2 = python3Packages.mistune.overridePythonAttrs(oldAttrs: rec {
version = "2.0.5";
src = fetchPypi {
inherit (oldAttrs) pname;
inherit version;
hash = "sha256-AkYRPLJJLbh1xr5Wl0p8iTMzvybNkokchfYxUc7gnTQ=";
};
});
in
python3Packages.buildPythonPackage rec {
pname = "present";
version = "0.6.0";
src = fetchPypi {
inherit pname version;
hash = "sha256-l9W5L4LD9qRo3rLBkgd2I/aDaj+ucib5UYg+X4RYg6c=";
};
propagatedBuildInputs = with python3Packages; [
click
pyyaml
pyfiglet
asciimatics
mistune_2
];
pythonImportsCheck = [ "present" ];
# TypeError: don't know how to make test from: 0.6.0
doCheck = false;
meta = with lib; {
description = "Terminal-based presentation tool with colors and effects";
homepage = "https://github.com/vinayak-mehta/present";
license = licenses.asl20;
maintainers = with maintainers; [ lom ];
mainProgram = "present";
};
}