# How to invoke \`nix-shell -p\` for packages not in Nixpkgs?

**URL:** https://discourse.nixos.org/t/how-to-invoke-nix-shell-p-for-packages-not-in-nixpkgs/12475
**Category:** Help
**Created:** [April 14, 2021, 1:18pm UTC](https://discourse.nixos.org/t/how-to-invoke-nix-shell-p-for-packages-not-in-nixpkgs/12475 "2021-04-14T13:18:56Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![jonringer](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jonringer/32/1348_2.png) [@jonringer](https://discourse.nixos.org/u/jonringer)
#### Post date: [April 14, 2021, 5:54pm UTC](https://discourse.nixos.org/t/how-to-invoke-nix-shell-p-for-packages-not-in-nixpkgs/12475/3 "2021-04-14T17:54:53Z")

</div>

if you have flakes enabled:

```auto
nix shell github:DavHau/mach-nix

```

works

I would just capture `mach-nix` in your `shell.nix` or `devShell` in your `flake.nix`. Then pair it with `direnv` to allow you to bring it into your shell when you need it for a particular project

---

_[View the full topic](https://discourse.nixos.org/t/how-to-invoke-nix-shell-p-for-packages-not-in-nixpkgs/12475)._
