Skip to content

Commit

Permalink
impureWithCuda: fix gcc version (#2990)
Browse files Browse the repository at this point in the history
* impureWithCuda: fix gcc version

* trufflehog: do not fail on unverified results
  • Loading branch information
danieldk authored Feb 4, 2025
1 parent 88fd56f commit dd2bd5f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 10 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/trufflehog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ jobs:
trufflehog:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Secret Scanning
uses: trufflesecurity/trufflehog@main
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Secret Scanning
uses: trufflesecurity/trufflehog@main
with:
extra_args: --results=verified,unknown
18 changes: 14 additions & 4 deletions nix/impure-shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,18 @@ mkShell {
( cd clients/python ; python -m pip install --no-dependencies -e . )
'';

postShellHook = ''
unset SOURCE_DATE_EPOCH
export PATH=$PATH:~/.cargo/bin
'';
postShellHook =
''
unset SOURCE_DATE_EPOCH
export PATH=${cudaPackages.backendStdenv.cc}/bin:$PATH:~/.cargo/bin
''
# At various points in time, the latest gcc supported by CUDA differs
# from the default version in nixpkgs. A lot of the dependencies in
# the impure environment pull in the default gcc from nixpkgs, so we
# end up with the CUDA-supported gcc and the nixpkgs default gcc in
# the path. To ensure that we can build CUDA kernels, put the CUDA
# first in the path. It's a hack, but it works.
+ lib.optionalString withCuda ''
export PATH=${cudaPackages.backendStdenv.cc}/bin:$PATH
'';
}

0 comments on commit dd2bd5f

Please sign in to comment.