Skip to content

Commit b9d0272

Browse files
committed
feat: added indirect input
1 parent 8ef9c60 commit b9d0272

File tree

2 files changed

+48
-148
lines changed

2 files changed

+48
-148
lines changed

flake.lock

+14-108
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+34-40
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,45 @@
11
{
22
inputs = {
3-
nixpkgs.url = "github:nixos/nixpkgs";
4-
nixpkgs.follows = "nixpkgs-matrix/nixpkgs";
5-
nixpkgs-matrix.url = "github:matrixai/nixpkgs-matrix";
3+
nixpkgs-matrix = {
4+
type = "indirect";
5+
id = "nixpkgs-matrix";
6+
};
67
flake-utils.url = "github:numtide/flake-utils";
78
};
89

9-
outputs = { nixpkgs, flake-utils, ... }:
10+
outputs = { nixpkgs-matrix, flake-utils, ... }:
1011
flake-utils.lib.eachDefaultSystem (system:
1112
let
12-
pkgs = import nixpkgs { inherit system; };
13+
pkgs = nixpkgs-matrix.legacyPackages.${system};
1314

14-
shell = { ci ? false }: with pkgs; mkShell {
15-
nativeBuildInputs = [
16-
nodejs_20
17-
nodejs.python
18-
shellcheck
19-
gitAndTools.gh
20-
clang-tools
21-
];
22-
NIX_DONT_SET_RPATH = true;
23-
NIX_NO_SELF_RPATH = true;
24-
shellHook = ''
25-
echo "Entering $(npm pkg get name)"
26-
set -o allexport
27-
. ./.env
28-
set +o allexport
29-
set -v
30-
${
31-
lib.optionalString ci
32-
''
33-
set -o errexit
34-
set -o nounset
35-
set -o pipefail
36-
shopt -s inherit_errexit
37-
''
38-
}
39-
mkdir --parents "$(pwd)/tmp"
40-
export PATH="$(pwd)/dist/bin:$(npm root)/.bin:$PATH"
41-
export npm_config_nodedir="${nodejs}"
42-
export NIX_DEBUG=1
43-
npm install --ignore-scripts
44-
set +v
45-
'';
46-
};
47-
in
48-
{
15+
shell = { ci ? false }:
16+
with pkgs;
17+
mkShell {
18+
nativeBuildInputs =
19+
[ nodejs_20 nodejs.python shellcheck gitAndTools.gh clang-tools ];
20+
NIX_DONT_SET_RPATH = true;
21+
NIX_NO_SELF_RPATH = true;
22+
shellHook = ''
23+
echo "Entering $(npm pkg get name)"
24+
set -o allexport
25+
. ./.env
26+
set +o allexport
27+
set -v
28+
${lib.optionalString ci ''
29+
set -o errexit
30+
set -o nounset
31+
set -o pipefail
32+
shopt -s inherit_errexit
33+
''}
34+
mkdir --parents "$(pwd)/tmp"
35+
export PATH="$(pwd)/dist/bin:$(npm root)/.bin:$PATH"
36+
export npm_config_nodedir="${nodejs}"
37+
export NIX_DEBUG=1
38+
npm install --ignore-scripts
39+
set +v
40+
'';
41+
};
42+
in {
4943
devShells = {
5044
default = shell { ci = false; };
5145
ci = shell { ci = true; };

0 commit comments

Comments
 (0)