Skip to content

Commit 1297672

Browse files
authored
chore: Update rust toolchain in nix flake (#22905)
1 parent 199e1cd commit 1297672

File tree

2 files changed

+53
-3
lines changed

2 files changed

+53
-3
lines changed

flake.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,55 @@
355355
pythonImportsCheck = [ "connectorx" ];
356356

357357
};
358+
ruff = super.buildPythonPackage rec {
359+
pname = "ruff";
360+
version = "0.9.4";
361+
pyproject = true;
362+
363+
outputs = [
364+
"bin"
365+
"out"
366+
];
367+
368+
src = pkgs.fetchFromGitHub {
369+
owner = "astral-sh";
370+
repo = pname;
371+
rev = version;
372+
hash = "sha256-HUCquxp8U6ZoHNSuUSu56EyiaSRRA8qUMYu6nNibt6w=";
373+
};
374+
375+
nativeBuildInputs =
376+
[ pkgs.installShellFiles ]
377+
++ (with pkgs.rustPlatform; [
378+
cargoSetupHook
379+
maturinBuildHook
380+
cargoCheckHook
381+
]);
382+
383+
buildInputs = with pkgs; [
384+
rust-jemalloc-sys
385+
];
386+
387+
cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
388+
inherit src;
389+
hash = "sha256-EiIN97I72Iam7STjZhHnvVktJXJocnVomjVp8a8t+fM=";
390+
};
391+
392+
postInstall =
393+
''
394+
mkdir -p $bin/bin
395+
mv $out/bin/ruff $bin/bin/
396+
rmdir $out/bin
397+
''
398+
+ pkgs.lib.optionalString (pkgs.stdenv.buildPlatform.canExecute pkgs.stdenv.hostPlatform) ''
399+
installShellCompletion --cmd ruff \
400+
--bash <($bin/bin/ruff generate-shell-completion bash) \
401+
--fish <($bin/bin/ruff generate-shell-completion fish) \
402+
--zsh <($bin/bin/ruff generate-shell-completion zsh)
403+
'';
404+
405+
doCheck = false;
406+
};
358407
kuzu = super.buildPythonPackage rec {
359408
pname = "kuzu";
360409
version = "0.4.1";
@@ -615,6 +664,7 @@
615664

616665
# Used for polars-benchmark
617666
pydantic-settings
667+
ruff
618668

619669
# # Used for Altair SVG / PNG conversions
620670
# (localPyPkg ./python-packages/vl-convert-python)

0 commit comments

Comments
 (0)