File tree Expand file tree Collapse file tree 3 files changed +26
-19
lines changed
Expand file tree Collapse file tree 3 files changed +26
-19
lines changed Original file line number Diff line number Diff line change 2727 uses : DeterminateSystems/magic-nix-cache-action@main
2828
2929 - name : Check
30- run : nix build --fallback --print-build-logs '.#check- clippy'
30+ run : nix build --fallback --print-build-logs ".#checks.$(nix eval --impure --raw --expr "builtins.currentSystem"). clippy"
3131
3232 - name : Upload analysis results
3333 uses : github/codeql-action/upload-sarif@v3
4949 uses : DeterminateSystems/magic-nix-cache-action@main
5050
5151 - name : Check
52- run : nix build --fallback --print-build-logs '.#check- rustfmt'
52+ run : nix build --fallback --print-build-logs ".#checks.$(nix eval --impure --raw --expr "builtins.currentSystem"). rustfmt"
5353
5454 nixfmt :
5555 runs-on : ubuntu-latest
6565 uses : DeterminateSystems/magic-nix-cache-action@main
6666
6767 - name : Check
68- run : nix build --fallback --print-build-logs '.#check- nixfmt'
68+ run : nix build --fallback --print-build-logs ".#checks.$(nix eval --impure --raw --expr "builtins.currentSystem"). nixfmt"
6969
7070 reuse :
7171 runs-on : ubuntu-latest
8181 uses : DeterminateSystems/magic-nix-cache-action@main
8282
8383 - name : Check
84- run : nix build --fallback --print-build-logs '.#check- reuse'
84+ run : nix build --fallback --print-build-logs ".#checks.$(nix eval --impure --raw --expr "builtins.currentSystem"). reuse"
Original file line number Diff line number Diff line change 4444 pkgs . stdenv . mkDerivation (
4545 {
4646 name = "check-${ name } " ;
47-
47+ inherit ( self . packages . ${ system } . nyoom ) src ;
4848 inherit nativeBuildInputs ;
49- inherit ( self . packages . ${ system } . nyoom ) src cargoDeps ;
49+
50+ strictDeps = true ;
5051
5152 buildPhase = ''
5253 ${ command }
8182 clippy = mkFlakeCheck {
8283 name = "clippy" ;
8384
84- nativeBuildInputs = with pkgs ; [
85- rustPlatform . cargoSetupHook
86- cargo
87- rustc
88- clippy
89- clippy-sarif
90- sarif-fmt
91- ] ;
85+ nativeBuildInputs =
86+ with pkgs ;
87+ [
88+ rustPlatform . cargoSetupHook
89+ cargo
90+ rustc
91+ clippy
92+ clippy-sarif
93+ sarif-fmt
94+ ]
95+ ++ lib . optionals stdenv . hostPlatform . isDarwin [
96+ pkg-config
97+ ] ;
9298
9399 command = ''
94100 cargo clippy --all-features --all-targets --tests \
95101 --offline --message-format=json \
96102 | clippy-sarif | tee $out | sarif-fmt
97103 '' ;
104+
105+ extraConfig = {
106+ inherit ( self . packages . ${ system } . nyoom ) cargoDeps buildInputs ;
107+ } ;
98108 } ;
99109
100110 reuse = mkFlakeCheck {
153163 inherit ( packages ) nyoom ;
154164 default = packages . nyoom ;
155165 }
156- // ( lib . attrsets . mapAttrs' (
157- name : value : lib . nameValuePair "check-${ name } " value
158- ) self . checks . ${ system } )
159166 ) ;
160167
161168 legacyPackages = forAllSystems (
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ rustPlatform.buildRustPackage rec {
3939 lockFile = ../Cargo.lock ;
4040 } ;
4141
42- buildInputs = lib . optionals stdenv . isDarwin [
42+ buildInputs = lib . optionals stdenv . hostPlatform . isDarwin [
4343 darwin . apple_sdk . frameworks . CoreFoundation
4444 darwin . apple_sdk . frameworks . Security
4545 darwin . apple_sdk . frameworks . SystemConfiguration
@@ -51,7 +51,7 @@ rustPlatform.buildRustPackage rec {
5151 [
5252 installShellFiles
5353 ]
54- ++ lib . optionals stdenv . isDarwin [
54+ ++ lib . optionals stdenv . hostPlatform . isDarwin [
5555 pkg-config
5656 ] ;
5757
You can’t perform that action at this time.
0 commit comments