-
Notifications
You must be signed in to change notification settings - Fork 4
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
10 changed files
with
562 additions
and
91 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
use nix |
Validating CODEOWNERS rules …
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 @@ | ||
* @eqyiel |
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,25 @@ | ||
on: | ||
pull_request: | ||
push: | ||
jobs: | ||
tests: | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- uses: 'actions/[email protected]' | ||
with: | ||
submodules: 'recursive' | ||
- uses: 'cachix/install-nix-action@v17' | ||
with: | ||
nix_path: 'nixpkgs=channel:nixpkgs-unstable' | ||
- run: | | ||
nix-shell --command 'yarn && yarn run test' | ||
if ! test -z "$(git status --porcelain)"; then | ||
echo "There were untracked files after running linters, please check the output of git status" | ||
git status | ||
exit 1 | ||
fi | ||
- run: | | ||
nix-shell --arg nodeVersion '"nodejs-14_x"' --command 'yarn && yarn run test' | ||
- run: | | ||
nix-shell --arg nodeVersion '"nodejs-16_x"' --command 'yarn && yarn run test' |
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,2 +1,3 @@ | ||
node_modules/ | ||
build/ | ||
.nyc_output/ |
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
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
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,38 +1,28 @@ | ||
{ nixpkgs ? <nixpkgs>, system ? builtins.currentSystem }: | ||
{ nodeVersion ? "nodejs-12_x" }: | ||
|
||
let | ||
# nix-prefetch-url --unpack https://github.com/NixOS/nixpkgs/archive/6766fb6503ae1ebebc2a9704c162b2aef351f921.tar.gz | ||
nixpkgs = | ||
import | ||
(builtins.fetchTarball { | ||
name = "nixpkgs-unstable-2022-04-30"; | ||
url = https://github.com/NixOS/nixpkgs/archive/6766fb6503ae1ebebc2a9704c162b2aef351f921.tar.gz; | ||
sha256 = "1a805n9iqlbmffkzq3l6yf2xp74wjaz5pdcp0cfl0rhc179w4lpy"; | ||
}) | ||
{ }; | ||
|
||
nixpkgsLocal = import nixpkgs { inherit system; }; | ||
|
||
nixpkgsUnstable = with nixpkgsLocal.pkgs; callPackage (stdenv.mkDerivation rec { | ||
name = "nixpkgs-unstable-${version}"; | ||
version = "2018-08-10"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "NixOS"; | ||
repo = "nixpkgs-channels"; | ||
rev = "bf1b50cbc8ffe9747758d089e3148406a7ce5c21"; | ||
sha256 = "0clczc8n7415i7pcqs1my8ydf0sijkcwqw6c36dgn998kdrgknh8"; | ||
}; | ||
|
||
dontBuild = true; | ||
preferLocalBuild = true; | ||
|
||
installPhase = '' | ||
cp -a . $out | ||
''; | ||
}) { inherit system; }; | ||
|
||
in with nixpkgsUnstable.pkgs; stdenv.mkDerivation rec { | ||
name = "node-woff2-env"; | ||
env = buildEnv { name = name; paths = buildInputs; }; | ||
buildInputs = with pkgs; [ | ||
nodejs-6_x | ||
python | ||
] ++ (with nodePackages_6_x; [ | ||
yarn node-gyp | ||
nodejs = builtins.getAttr nodeVersion nixpkgs.pkgs; | ||
in | ||
nixpkgs.pkgs.mkShell { | ||
packages = [ | ||
nodejs | ||
nixpkgs.pkgs.python3 | ||
] ++ (with nixpkgs.pkgs.nodePackages; [ | ||
(nixpkgs.pkgs.yarn.override { nodejs = nodejs; }) | ||
]); | ||
|
||
shellHook = '' | ||
echo ✨ environment ready! | ||
# Teach node-gyp where to find headers locally | ||
export npm_config_nodedir=${nodejs} | ||
''; | ||
} |
Oops, something went wrong.