| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,6 +23,7 @@ on: | |||
| 23 | 23 | - tools/eslint-rules/** | |
| 24 | 24 | - tools/eslint/** | |
| 25 | 25 | - tools/lint-md/** | |
| 26 | + - tools/nix/** | ||
| 26 | 27 | - typings/** | |
| 27 | 28 | - vcbuild.bat | |
| 28 | 29 | - .** | |
@@ -52,6 +53,7 @@ on: | |||
| 52 | 53 | - tools/eslint-rules/** | |
| 53 | 54 | - tools/eslint/** | |
| 54 | 55 | - tools/lint-md/** | |
| 56 | + - tools/nix/** | ||
| 55 | 57 | - typings/** | |
| 56 | 58 | - vcbuild.bat | |
| 57 | 59 | - .** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,6 +23,7 @@ on: | |||
| 23 | 23 | - tools/eslint-rules/** | |
| 24 | 24 | - tools/eslint/** | |
| 25 | 25 | - tools/lint-md/** | |
| 26 | + - tools/nix/** | ||
| 26 | 27 | - typings/** | |
| 27 | 28 | - .** | |
| 28 | 29 | - '!.github/workflows/coverage-windows.yml' | |
@@ -49,6 +50,7 @@ on: | |||
| 49 | 50 | - tools/eslint-rules/** | |
| 50 | 51 | - tools/eslint/** | |
| 51 | 52 | - tools/lint-md/** | |
| 53 | + - tools/nix/** | ||
| 52 | 54 | - typings/** | |
| 53 | 55 | - .** | |
| 54 | 56 | - '!.github/workflows/coverage-windows.yml' | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,10 +11,12 @@ on: | |||
| 11 | 11 | - v[0-9]+.x | |
| 12 | 12 | paths: | |
| 13 | 13 | - '**.nix' | |
| 14 | + - tools/nix/** | ||
| 14 | 15 | - .github/workflows/nix-changes.yml | |
| 15 | 16 | pull_request: | |
| 16 | 17 | paths: | |
| 17 | 18 | - '**.nix' | |
| 19 | + - tools/nix/** | ||
| 18 | 20 | - .github/workflows/nix-changes.yml | |
| 19 | 21 | types: [opened, synchronize, reopened, ready_for_review] | |
| 20 | 22 | ||
@@ -47,7 +49,9 @@ jobs: | |||
| 47 | 49 | with: | |
| 48 | 50 | fetch-depth: 2 | |
| 49 | 51 | persist-credentials: false | |
| 50 | - sparse-checkout: '*.nix' | ||
| 52 | + sparse-checkout: | | ||
| 53 | + shell.nix | ||
| 54 | + tools/nix/ | ||
| 51 | 55 | sparse-checkout-cone-mode: false | |
| 52 | 56 | ||
| 53 | 57 | - uses: cachix/install-nix-action@630ae543ea3a38a9a4166f03376c02c50f408342 # v31.11.0 | |
@@ -60,39 +64,14 @@ jobs: | |||
| 60 | 64 | name: nodejs | |
| 61 | 65 | ||
| 62 | 66 | - name: Compute requisites after change | |
| 63 | - shell: bash # See https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference, we want the pipefail option. | ||
| 64 | - run: | | ||
| 65 | - nix-store --query --references "$( | ||
| 66 | - nix-instantiate -I "nixpkgs=./tools/nix/pkgs.nix" shell.nix \ | ||
| 67 | - --arg devTools " | ||
| 68 | - (import ./tools/nix/devTools.nix {}) | ||
| 69 | - ++ builtins.attrValues ( | ||
| 70 | - { inherit (import <nixpkgs> {}) nixfmt-tree sccache; } | ||
| 71 | - // import ./tools/nix/openssl-matrix.nix {} | ||
| 72 | - // import ./tools/nix/pkcs11.nix {} | ||
| 73 | - )")" \ | ||
| 74 | - | xargs nix-store --realise \ | ||
| 75 | - | xargs nix-store --query --requisites \ | ||
| 76 | - | sort -k1.45 \ | ||
| 77 | - > requisites-${{ matrix.system }}-after.list | ||
| 67 | + run: ./tools/nix/list-requisites.sh > requisites-${{ matrix.system }}-after.list | ||
| 78 | 68 | ||
| 79 | 69 | - name: Compute requisites before change | |
| 80 | - shell: bash # See https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference, we want the pipefail option. | ||
| 81 | 70 | run: | | |
| 82 | 71 | git reset HEAD^ --hard | |
| 83 | - nix-store --query --references "$( | ||
| 84 | - nix-instantiate -I "nixpkgs=./tools/nix/pkgs.nix" shell.nix \ | ||
| 85 | - --arg devTools " | ||
| 86 | - (import ./tools/nix/devTools.nix {}) | ||
| 87 | - ++ builtins.attrValues ( | ||
| 88 | - { inherit (import <nixpkgs> {}) nixfmt-tree sccache; } | ||
| 89 | - // import ./tools/nix/openssl-matrix.nix {} | ||
| 90 | - // import ./tools/nix/pkcs11.nix {} | ||
| 91 | - )")" \ | ||
| 92 | - | xargs nix-store --realise \ | ||
| 93 | - | xargs nix-store --query --requisites \ | ||
| 94 | - | sort -k1.45 \ | ||
| 95 | - > requisites-${{ matrix.system }}-before.list | ||
| 72 | + # TODO(aduh95): remove this once list-requisites.sh has reached `main` | ||
| 73 | + [ -f tools/nix/list-requisites.sh ] || git checkout FETCH_HEAD -- tools/nix/list-requisites.sh | ||
| 74 | + ./tools/nix/list-requisites.sh > requisites-${{ matrix.system }}-before.list | ||
| 96 | 75 | ||
| 97 | 76 | - name: Output diff | |
| 98 | 77 | run: | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,6 +9,7 @@ on: | |||
| 9 | 9 | - tools/actions/** | |
| 10 | 10 | - tools/clang-format/** | |
| 11 | 11 | - tools/dep_updaters/** | |
| 12 | + - tools/nix/** | ||
| 12 | 13 | - test/internet/** | |
| 13 | 14 | - '**.nix' | |
| 14 | 15 | - .github/** | |
@@ -27,6 +28,7 @@ on: | |||
| 27 | 28 | - tools/actions/** | |
| 28 | 29 | - tools/clang-format/** | |
| 29 | 30 | - tools/dep_updaters/** | |
| 31 | + - tools/nix/** | ||
| 30 | 32 | - test/internet/** | |
| 31 | 33 | - '**.nix' | |
| 32 | 34 | - .github/** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,6 +23,7 @@ on: | |||
| 23 | 23 | - tools/eslint-rules/** | |
| 24 | 24 | - tools/eslint/** | |
| 25 | 25 | - tools/lint-md/** | |
| 26 | + - tools/nix/** | ||
| 26 | 27 | - typings/** | |
| 27 | 28 | - vcbuild.bat | |
| 28 | 29 | - .** | |
@@ -53,6 +54,7 @@ on: | |||
| 53 | 54 | - tools/eslint-rules/** | |
| 54 | 55 | - tools/eslint/** | |
| 55 | 56 | - tools/lint-md/** | |
| 57 | + - tools/nix/** | ||
| 56 | 58 | - typings/** | |
| 57 | 59 | - vcbuild.bat | |
| 58 | 60 | - .** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -44,6 +44,7 @@ on: | |||
| 44 | 44 | - '!tools/nix/**' | |
| 45 | 45 | - '!tools/v8/**' | |
| 46 | 46 | - '!tools/v8_gypfiles/**' | |
| 47 | + - tools/nix/list-requisites.sh | ||
| 47 | 48 | - typings/** | |
| 48 | 49 | - vcbuild.bat | |
| 49 | 50 | - .** | |
@@ -96,6 +97,7 @@ on: | |||
| 96 | 97 | - '!tools/nix/**' | |
| 97 | 98 | - '!tools/v8/**' | |
| 98 | 99 | - '!tools/v8_gypfiles/**' | |
| 100 | + - tools/nix/list-requisites.sh | ||
| 99 | 101 | - typings/** | |
| 100 | 102 | - vcbuild.bat | |
| 101 | 103 | - .** | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,62 @@ | |||
| 1 | + #!/bin/sh | ||
| 2 | + | ||
| 3 | + set -ex | ||
| 4 | + | ||
| 5 | + BASE_DIR=$(cd "$(dirname "$0")/../.." && pwd) | ||
| 6 | + | ||
| 7 | + OPTIONAL_FLAGS=$(nix-instantiate -I "nixpkgs=$BASE_DIR/tools/nix/pkgs.nix" --eval --strict --raw -E " | ||
| 8 | + (import <nixpkgs> {}).lib.concatMapStrings | ||
| 9 | + (n: ''--arg \${n} true '') | ||
| 10 | + (builtins.filter | ||
| 11 | + (n: builtins.match ''with[A-Z].+'' n != null) | ||
| 12 | + (builtins.attrNames (builtins.functionArgs (import $BASE_DIR/shell.nix)))) | ||
| 13 | + " | ||
| 14 | + ) | ||
| 15 | + | ||
| 16 | + DRV=$( | ||
| 17 | + cd "$BASE_DIR" | ||
| 18 | + # shellcheck disable=SC2086 | ||
| 19 | + nix-instantiate -I "nixpkgs=./tools/nix/pkgs.nix" shell.nix \ | ||
| 20 | + $OPTIONAL_FLAGS \ | ||
| 21 | + --arg sharedLibDeps '{ | ||
| 22 | + # Using an empty set as some build dependencies are required only in the absence of shared deps (e.g. Cargo). | ||
| 23 | + # We pass the shared deps as devTools below so they are still accounted for. | ||
| 24 | + }' \ | ||
| 25 | + --arg pkcs11 'import ./tools/nix/pkcs11.nix { | ||
| 26 | + # Passing an import call rather than "true" to workaround sharedLibDeps being empty. | ||
| 27 | + }' \ | ||
| 28 | + --arg devTools ' | ||
| 29 | + let | ||
| 30 | + pkgs = import <nixpkgs> { }; | ||
| 31 | + sharedLibDepsFn = import ./tools/nix/sharedLibDeps.nix; | ||
| 32 | + in | ||
| 33 | + (import ./tools/nix/devTools.nix { }) | ||
| 34 | + ++ pkgs.lib.flatten ( | ||
| 35 | + with (pkgs.callPackage ./tools/nix/v8.nix { }); | ||
| 36 | + [ | ||
| 37 | + # We do not want to build V8 here, but still want to list its requisites. | ||
| 38 | + buildInputs | ||
| 39 | + nativeBuildInputs | ||
| 40 | + propagatedBuildInputs | ||
| 41 | + propagatedNativeBuildInputs | ||
| 42 | + (pkgs.callPackage ./tools/nix/non-v8-deps-mock.nix { }) | ||
| 43 | + ] | ||
| 44 | + ) | ||
| 45 | + ++ builtins.attrValues ( | ||
| 46 | + { | ||
| 47 | + # Additional packages we are using across the codebase | ||
| 48 | + inherit (pkgs) nixfmt-tree sccache; | ||
| 49 | + } | ||
| 50 | + // import ./tools/nix/openssl-matrix.nix { } | ||
| 51 | + // sharedLibDepsFn ( | ||
| 52 | + pkgs.lib.filterAttrs (n: v: builtins.match "with[A-Z].+" n != null) ( | ||
| 53 | + builtins.functionArgs sharedLibDepsFn | ||
| 54 | + ) | ||
| 55 | + ) | ||
| 56 | + )' | ||
| 57 | + ) | ||
| 58 | + REFS=$(nix-store --query --references "$DRV") | ||
| 59 | + STORE_PATHS=$(echo "$REFS" | xargs nix-store --realise) | ||
| 60 | + REQUISITES=$(echo "$STORE_PATHS" | xargs nix-store --query --requisites) | ||
| 61 | + | ||
| 62 | + echo "$REQUISITES" | sort -k1.45 | uniq | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments