Created
August 20, 2019 09:16
-
-
Save c0deaddict/b2a6dc00a7a67b9d25ab80f0f1de2244 to your computer and use it in GitHub Desktop.
NixOS custom nodePackages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs, nodejs, stdenv }: | |
let | |
nodePackages = import ./composition.nix { | |
inherit pkgs nodejs; | |
inherit (stdenv.hostPlatform) system; | |
}; | |
in | |
nodePackages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env nix-shell | |
#! nix-shell -i bash -p nodePackages.node2nix | |
set -eu -o pipefail | |
rm -f node-env.nix | |
node2nix --nodejs-10 -i packages.json -o packages.nix -c composition.nix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
home.packages = let | |
myNodePackages = import ../../custom/node-packages { | |
inherit pkgs nodejs stdenv; | |
}; | |
in [ | |
nodejs | |
(with myNodePackages; [ | |
eslint | |
typescript-language-server | |
... | |
]) | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
"eslint" | |
, "eslint-config-prettier" | |
, "eslint-plugin-prettier" | |
, "javascript-typescript-langserver" | |
, "typescript" | |
, "typescript-language-server" | |
, "prettier" | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment