-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
14 changed files
with
3,204 additions
and
94 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,8 @@ | |
/.direnv | ||
/result | ||
|
||
# TS/JS | ||
node_modules | ||
|
||
# Rust | ||
/target |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
cjs, | ||
fetchYarnDeps, | ||
src, | ||
stdenvNoCC, | ||
nodejs, | ||
prefetch-yarn-deps, | ||
yarn, | ||
yarnLockHash | ||
}: | ||
stdenvNoCC.mkDerivation { | ||
inherit src; | ||
inherit (cjs) version; | ||
|
||
pname = "teddybear-tests"; | ||
|
||
offlineCache = fetchYarnDeps { | ||
yarnLock = "${src}/yarn.lock"; | ||
hash = yarnLockHash; | ||
}; | ||
|
||
nativeBuildInputs = [ | ||
nodejs | ||
yarn | ||
prefetch-yarn-deps | ||
]; | ||
|
||
postPatch = '' | ||
export HOME=$(mktemp -d) | ||
yarn config --offline set yarn-offline-mirror $offlineCache | ||
fixup-yarn-lock yarn.lock | ||
# For easier test development, "teddybear-tests" package contains pre-installed | ||
# Teddybear from NPM. However, the NPM version obviously does not correspond to the | ||
# Teddybear version that is meant to be tested, so we dynamically replace it here. | ||
# | ||
# This will only work if Teddybear continues to not require any third-party dependencies. | ||
yarn remove @vaultie/teddybear-node | ||
yarn add file:${cjs} | ||
yarn install \ | ||
--offline \ | ||
--ignore-scripts \ | ||
--no-progress \ | ||
--non-interactive | ||
patchShebangs node_modules/ | ||
''; | ||
|
||
buildPhase = '' | ||
yarn test | ||
touch $out | ||
''; | ||
} |
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
Oops, something went wrong.