-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e54cafe
commit c2c13a2
Showing
85 changed files
with
11,347 additions
and
50,397 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +0,0 @@ | ||
STEP_ROOT='tmp/secrets/CA/root_ca.crt' | ||
STEP_CA_URL='https://localhost:55555' | ||
CERTIFICATE_AUTHORITY_PROVISIONER_PASSWORD= | ||
CERTIFICATE_AUTHORITY_FINGERPRINT= | ||
|
||
// Twilio STUN and TURN | ||
TWILIO_ACCOUNT_SID= | ||
TWILIO_AUTH_TOKEN= | ||
|
||
// Change where polykey agent | ||
// socket and logs are created | ||
PK_SOCKET_PATH= | ||
PK_LOG_PATH= | ||
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
.env | ||
.* | ||
/pkgs.nix | ||
/default.nix | ||
/shell.nix | ||
/webpack.config.js | ||
/release.nix | ||
/tsconfig.json | ||
/doc | ||
/src | ||
/test | ||
/log | ||
/tests |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
"semi": true, | ||
"trailingComma": "all", | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"printWidth": 80, | ||
"tabWidth": 2 | ||
} |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,54 @@ | ||
{ pkgs, nix-gitignore }: | ||
{ runCommandNoCC | ||
, nix-gitignore | ||
, nodejs | ||
, nodePackages | ||
, pkgs | ||
, lib | ||
}: | ||
|
||
let | ||
drv = (import ./nix/generated/node-composition.nix { inherit pkgs; }).package; | ||
src = nix-gitignore.gitignoreSource [".git"] ./.; | ||
nodeVersion = builtins.elemAt (lib.versions.splitVersion nodejs.version) 0; | ||
node2nixDrv = dev: runCommandNoCC "node2nix" {} '' | ||
mkdir $out | ||
${nodePackages.node2nix}/bin/node2nix \ | ||
${lib.optionalString dev "--development"} \ | ||
--input ${src}/package.json \ | ||
--lock ${src}/package-lock.json \ | ||
--node-env $out/node-env.nix \ | ||
--output $out/node-packages.nix \ | ||
--composition $out/default.nix \ | ||
--nodejs-${nodeVersion} | ||
''; | ||
devPackage = (import (node2nixDrv true) { inherit pkgs nodejs; }).package; | ||
prodDeps = ( | ||
(import (node2nixDrv false) { inherit pkgs nodejs; }).shell.override { | ||
dontNpmInstall = true; | ||
} | ||
).nodeDependencies; | ||
drv = devPackage.overrideAttrs (attrs: { | ||
src = src; | ||
dontNpmInstall = true; | ||
postInstall = '' | ||
# The dependencies were prepared in the install phase | ||
# See `node2nix` generated `node-env.nix` for details. | ||
npm run build | ||
# This call does not actually install packages. The dependencies | ||
# are present in `node_modules` already. It creates symlinks in | ||
# $out/lib/node_modules/.bin according to `bin` section in `package.json`. | ||
npm install | ||
# replace dev dependencies | ||
rm -rf $out/lib/node_modules/${attrs.packageName}/node_modules | ||
cp -r ${prodDeps}/lib/node_modules $out/lib/node_modules/${attrs.packageName}/ | ||
# Create symlink to the deployed executable folder, if applicable | ||
if [ -d "$out/lib/node_modules/.bin" ] | ||
then | ||
ln -s $out/lib/node_modules/.bin $out/bin | ||
fi | ||
''; | ||
}); | ||
in | ||
drv.overrideAttrs (attrs: { | ||
src = nix-gitignore.gitignoreSource [] attrs.src; | ||
}) | ||
drv |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.