Skip to content

Commit

Permalink
pre-commit: Format using nixfmt-rfc-style
Browse files Browse the repository at this point in the history
  • Loading branch information
l0b0 committed Oct 10, 2024
1 parent 6422c78 commit ed61c2e
Showing 1 changed file with 32 additions and 29 deletions.
61 changes: 32 additions & 29 deletions pkgs/tools/misc/pre-commit/default.nix
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
{ lib
, fetchFromGitHub
, python3Packages
, libiconv
, cargo
, coursier
, dotnet-sdk
, git
, glibcLocales
, go
, nodejs
, perl
, cabal-install
, testers
, pre-commit
{
lib,
fetchFromGitHub,
python3Packages,
libiconv,
cargo,
coursier,
dotnet-sdk,
git,
glibcLocales,
go,
nodejs,
perl,
cabal-install,
testers,
pre-commit,
}:

with python3Packages;
Expand Down Expand Up @@ -81,24 +82,26 @@ buildPythonApplication rec {
"--forked"
];

preCheck = lib.optionalString (!(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64)) ''
# Disable outline atomics for rust tests on aarch64-linux.
export RUSTFLAGS="-Ctarget-feature=-outline-atomics"
'' + ''
export GIT_AUTHOR_NAME=test GIT_COMMITTER_NAME=test \
[email protected] [email protected] \
VIRTUALENV_NO_DOWNLOAD=1 PRE_COMMIT_NO_CONCURRENCY=1 LANG=en_US.UTF-8
preCheck =
lib.optionalString (!(stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64)) ''
# Disable outline atomics for rust tests on aarch64-linux.
export RUSTFLAGS="-Ctarget-feature=-outline-atomics"
''
+ ''
export GIT_AUTHOR_NAME=test GIT_COMMITTER_NAME=test \
[email protected] [email protected] \
VIRTUALENV_NO_DOWNLOAD=1 PRE_COMMIT_NO_CONCURRENCY=1 LANG=en_US.UTF-8
# Resolve `.NET location: Not found` errors for dotnet tests
export DOTNET_ROOT="${dotnet-sdk}"
# Resolve `.NET location: Not found` errors for dotnet tests
export DOTNET_ROOT="${dotnet-sdk}"
export HOME=$(mktemp -d)
export HOME=$(mktemp -d)
git init -b master
git init -b master
python -m venv --system-site-packages venv
source "$PWD/venv/bin/activate"
'';
python -m venv --system-site-packages venv
source "$PWD/venv/bin/activate"
'';

postCheck = ''
deactivate
Expand Down

0 comments on commit ed61c2e

Please sign in to comment.