1 # Hy {#sec-language-hy}
3 ## Installation {#ssec-hy-installation}
5 ### Installation without packages {#installation-without-packages}
7 You can install `hy` via nix-env or by adding it to `configuration.nix` by referring to it as a `hy` attribute. This kind of installation adds `hy` to your environment and it successfully works with `python3`.
10 Packages that are installed with your python derivation, are not accessible by `hy` this way.
13 ### Installation with packages {#installation-with-packages}
15 Creating `hy` derivation with custom `python` packages is really simple and similar to the way that python does it. Attribute `hy` provides function `withPackages` that creates custom `hy` derivation with specified packages.
17 For example if you want to create shell with `matplotlib` and `numpy`, you can do it like so:
20 $ nix-shell -p "hy.withPackages (ps: with ps; [ numpy matplotlib ])"
23 Or if you want to extend your `configuration.nix`:
27 environment.systemPackages = with pkgs; [
28 (hy.withPackages (py-packages: with py-packages; [ numpy matplotlib ]))