nix-book/source/recipes/shebang/python-nixpkg/main.adoc0
Amy de Buitléir 7e29b45472 expanded
2025-09-05 20:38:10 +01:00

17 lines
437 B
Text

= Access a Python library package in the nixpkgs repo (without using a Python builder)
Occasionally you might want to run a short Python program that depends on a Python library,
but you don't want to bother configuring a builder.
Example: Access the `html_sanitizer` package from the `python3nnPackages` set in the nixpkgs repo.
[source,python,linenums]
.Script
....
include::my-script.sh[]
....
.Output
....
$# ./my-script.sh
....