Advertisement
Guest User

Untitled

a guest
Jun 11th, 2018
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. λ cat ~/.nixpkgs/config.nix
  2. { pkgs }:
  3.  
  4. {
  5. packageOverrides = super: {
  6. nix-npm-install = pkgs.writeScriptBin "nix-npm-install" ''
  7. #!/usr/bin/env bash
  8. tempdir="/tmp/nix-npm-install/$1"
  9. mkdir -p $tempdir
  10. pushd $tempdir
  11. # note the differences here:
  12. ${super.nodePackages.node2nix}/bin/node2nix -8 --input <( echo "[\"$1\"]")
  13. nix-env --install --file .
  14. popd
  15. '';
  16. };
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement