Remove etc/shell.nix in favour of shell.nix (#34336)

Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
Delan Azabani 2024-11-22 12:03:35 +08:00 committed by GitHub
parent 1f0b88934b
commit 67012a5091
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 5 additions and 7 deletions

View file

@ -1 +0,0 @@
../shell.nix

4
mach
View file

@ -37,10 +37,10 @@ if __name__ == '__main__':
from shlex import quote from shlex import quote
mach_dir = os.path.abspath(os.path.dirname(__file__)) mach_dir = os.path.abspath(os.path.dirname(__file__))
build_android_args = ['--arg', 'buildAndroid', 'true'] if 'SERVO_ANDROID_BUILD' in os.environ else [] build_android_args = ['--arg', 'buildAndroid', 'true'] if 'SERVO_ANDROID_BUILD' in os.environ else []
print('NOTE: Entering nix-shell etc/shell.nix') print(f'NOTE: Entering nix-shell {mach_dir}/shell.nix')
try: try:
# sys argv already contains the ./mach part, so we just need to pass it as-is # sys argv already contains the ./mach part, so we just need to pass it as-is
result = subprocess.run(['nix-shell', mach_dir + '/etc/shell.nix'] + build_android_args + ['--run', ' '.join(map(quote, sys.argv))]) result = subprocess.run(['nix-shell', f'{mach_dir}/shell.nix'] + build_android_args + ['--run', ' '.join(map(quote, sys.argv))])
sys.exit(result.returncode) sys.exit(result.returncode)
except KeyboardInterrupt: except KeyboardInterrupt:
sys.exit(0) sys.exit(0)

View file

@ -126,7 +126,7 @@ class Linux(Base):
print('You will need to run a nix-shell if you are trying ' print('You will need to run a nix-shell if you are trying '
'to run any of the built binaries') 'to run any of the built binaries')
print('To enter the nix-shell manually use:') print('To enter the nix-shell manually use:')
print(' $ nix-shell etc/shell.nix') print(' $ nix-shell')
return False return False
if self.distro.lower() == 'ubuntu' and self.version > '22.04': if self.distro.lower() == 'ubuntu' and self.version > '22.04':

View file

@ -1,5 +1,5 @@
[toolchain] [toolchain]
# Be sure to update etc/shell.nix and support/crown/rust-toolchain.toml when bumping this! # Be sure to update shell.nix and support/crown/rust-toolchain.toml when bumping this!
channel = "1.80.1" channel = "1.80.1"
components = [ components = [

View file

@ -7,8 +7,7 @@ license = "MPL-2.0"
publish = false publish = false
# Do not use workspace dependencies in this package! # Do not use workspace dependencies in this package!
# In etc/shell.nix, we filter Cargo.lock and build this package in isolation, # crown is not part of the Cargo workspace.
# so it needs to make sense without the workspace manifest.
[dev-dependencies] [dev-dependencies]
compiletest_rs = { version = "0.11", features = ["tmp"] } compiletest_rs = { version = "0.11", features = ["tmp"] }