Skip to content

Commit

Permalink
Merge pull request #44 from bryango/bump-python-nixpkgs
Browse files Browse the repository at this point in the history
Bump python 3.10 -> 3.11 and nixpkgs
  • Loading branch information
Artturin authored Feb 20, 2024
2 parents 799b0f1 + 4cb0811 commit 049b7a2
Show file tree
Hide file tree
Showing 4 changed files with 238 additions and 149 deletions.
92 changes: 82 additions & 10 deletions flake.lock

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

27 changes: 18 additions & 9 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,61 @@

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils = { url = "github:numtide/flake-utils"; };
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
inputs.systems.follows = "flake-utils/systems";
};
};

outputs = { self, nixpkgs, flake-utils, flake-compat, ... }:
outputs = { self, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ ];
};
python = pkgs.python310;
poetry2nix = self.inputs.poetry2nix.lib.mkPoetry2Nix {
inherit pkgs;
};
python = pkgs.python311;
packageName = "hydra-check";
# update the pyproject.toml too
packageVersion = "1.3.5";
in
{
packages = rec {
hydra-check = python.pkgs.buildPythonApplication rec {
packages = {
hydra-check = python.pkgs.buildPythonApplication {
pname = packageName;
version = packageVersion;
format = "pyproject";
nativeBuildInputs = with python.pkgs; [ poetry-core ];
propagatedBuildInputs = with python.pkgs; [ requests beautifulsoup4 colorama ];
src = ./.;
checkInputs = with pkgs; [ python310.pkgs.mypy ];
checkInputs = with python.pkgs; [ mypy ];
checkPhase = ''
#export MYPYPATH=$PWD/src
#mypy --strict .
'';
};
default = hydra-check;
default = self.packages.${system}.hydra-check;
};

devShells = {
default = pkgs.mkShell {
buildInputs = with pkgs; [
pyright
poetry
(pkgs.poetry2nix.mkPoetryEnv {
(poetry2nix.mkPoetryEnv {
inherit python;
projectDir = ./.;
overrides = pkgs.poetry2nix.overrides.withDefaults (self: super: { });
overrides = poetry2nix.overrides.withDefaults (self: super: { });
editablePackageSources = {
hydra-check = ./src;
};
Expand Down
Loading

0 comments on commit 049b7a2

Please sign in to comment.