Skip to content

Commit 6d956de

Browse files
committedFeb 18, 2023
switch to flake
1 parent 11fc94d commit 6d956de

File tree

5 files changed

+99
-24
lines changed

5 files changed

+99
-24
lines changed
 

‎.envrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
use flake
2+
3+
export PYTHONPATH=$(realpath .):$PYTHONPATH

‎.github/workflows/test.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v3
1414
- uses: cachix/install-nix-action@v17
15-
with:
16-
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz
1715
- name: run tests
1816
run:
19-
nix-shell --run 'tox'
17+
nix develop -c 'tox'

‎flake.lock

+64
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎flake.nix

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
description = "Development environment for this project";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6+
flake-parts.url = "github:hercules-ci/flake-parts";
7+
};
8+
9+
outputs = inputs@{ flake-parts, ... }:
10+
flake-parts.lib.mkFlake { inherit inputs; } ({ lib, ... }: {
11+
systems = lib.systems.flakeExposed;
12+
perSystem = { pkgs, ... }: {
13+
devShells.default = pkgs.mkShell {
14+
packages = with pkgs; [
15+
bashInteractive
16+
python38
17+
python39
18+
(python310.withPackages(ps: [ps.setuptools ps.tox ps.wheel]))
19+
python311
20+
python312
21+
pypy3
22+
twine
23+
];
24+
shellHook = ''
25+
# breaks python36/python37
26+
unset _PYTHON_SYSCONFIGDATA_NAME
27+
'';
28+
};
29+
};
30+
});
31+
}

‎shell.nix

-21
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.