Skip to content

Instantly share code, notes, and snippets.

@d-goldin
Created December 15, 2019 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d-goldin/c33018f03ef739ead184e14df09150fd to your computer and use it in GitHub Desktop.
Save d-goldin/c33018f03ef739ead184e14df09150fd to your computer and use it in GitHub Desktop.
```
❯ cat package.json /tmp/intelephense
{
"name": "intelephense",
"version": "1.3.4"
}
❯ node2nix --nodejs-12 package.json /tmp/intelephense
fetching local directory: ./. from .
❯ nix repl '<nixpkgs>'
nix-repl> intelephene = import ./default.nix {}
nix-repl> :b intelephene.package
this derivation produced the following outputs:
out -> /nix/store/ip7ymhafh34a74z0vw6c3sf70mfd6ani-node_intelephense-1.3.4
```
So you should be able to do something like this in your configuration.nix;
```
let
intelephene = import ./default.nix {};
in
{
environment.systemPackages = [ intelephene.package ];
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment