Skip to content

Commit

Permalink
Merge pull request #294 from Mic92/treefmt
Browse files Browse the repository at this point in the history
unpin python 3.11
  • Loading branch information
Mic92 authored Nov 9, 2024
2 parents d611b0d + e34e697 commit 7fc8f56
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 21 deletions.
15 changes: 6 additions & 9 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
pkgs ? import <nixpkgs> { },
}:

pkgs.python311.pkgs.buildPythonApplication {
pkgs.python3.pkgs.buildPythonApplication {
pname = "nix-update";
version = "1.0.0";
version = "1.5.2";
src = ./.;
format = "pyproject";
pyproject = true;
buildInputs = [ pkgs.makeWrapper ];
nativeBuildInputs = [ pkgs.python311.pkgs.setuptools ];
nativeBuildInputs = [ pkgs.python3.pkgs.setuptools ];
nativeCheckInputs = [
pkgs.python311.pkgs.pytest
pkgs.python3.pkgs.pytest
# technically not test inputs, but we need it for development in PATH
pkgs.nixVersions.stable
pkgs.nix-prefetch-git
Expand All @@ -22,12 +22,9 @@ pkgs.python311.pkgs.buildPythonApplication {
"--prefix PATH"
":"
(pkgs.lib.makeBinPath [
pkgs.nixVersions.stable or pkgs.nix_2_4
pkgs.nixVersions.stable
pkgs.nixpkgs-review
pkgs.nix-prefetch-git
])
];
shellHook = ''
# workaround because `python setup.py develop` breaks for me
'';
}
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions treefmt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
projectRootFile = "flake.lock";

programs.deno.enable =
pkgs.lib.meta.availableOn pkgs.stdenv.hostPlatform pkgs.deno && !pkgs.deno.meta.broken;
pkgs.hostPlatform.system != "x86_64-darwin" && pkgs.hostPlatform.system != "riscv64-linux";
programs.mypy.enable = true;

programs.yamlfmt.enable = true;

programs.nixfmt.enable = pkgs.lib.meta.availableOn pkgs.stdenv.buildPlatform pkgs.nixfmt-rfc-style.compiler;
programs.nixfmt.enable = pkgs.hostPlatform.system != "riscv64-linux";
programs.deadnix.enable = true;
programs.ruff.format = true;
programs.ruff.check = true;

programs.shellcheck.enable = pkgs.lib.meta.availableOn pkgs.stdenv.buildPlatform pkgs.shellcheck.compiler;
programs.shellcheck.enable = pkgs.hostPlatform.system != "riscv64-linux";
programs.shfmt.enable = true;
settings.formatter.shfmt.includes = [ "*.envrc" ];
};
Expand Down

0 comments on commit 7fc8f56

Please sign in to comment.