Skip to content

Commit 953ed50

Browse files
jocelynthodesephii
andauthored
Apply suggestions from code review
Co-authored-by: sephi <sylvain@fankhauser.name>
1 parent 48ae747 commit 953ed50

File tree

2 files changed

+9
-26
lines changed

2 files changed

+9
-26
lines changed

flake.nix

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,14 @@
2828
fetchFromGitHub = pkgs.fetchFromGitHub;
2929
};
3030

31-
pythonVersions = ["python310" "python311" "python312" "python313"];
31+
pythonVersions = ["310" "311" "312" "313"];
3232

33-
makeCheckForPython = pythonName:
34-
pkgs.callPackage ./tests.nix {
35-
python3 = pkgs.${pythonName};
36-
taxi =
37-
(import ./pkgs.nix {
38-
inherit pkgs;
39-
lib = pkgs.lib;
40-
fetchFromGitHub = pkgs.fetchFromGitHub;
41-
makeWrapper = pkgs.makeWrapper;
42-
python3 = pkgs.${pythonName};
43-
}).taxi;
33+
makeCheckForPython = pythonVersion:
34+
let
35+
python3 = pkgs."python${pythonVersion}";
36+
in pkgs.callPackage ./tests.nix {
37+
inherit python3;
38+
inherit (pkgs.callPackage ./pkgs.nix { inherit python3; }) taxi;
4439
};
4540

4641
checksForPython = builtins.listToAttrs (map (py: {
@@ -63,13 +58,7 @@
6358
})
6459
// {
6560
overlays.default = final: prev: {
66-
taxi-cli = import ./pkgs.nix {
67-
lib = final.lib;
68-
python3 = final.python3;
69-
fetchFromGitHub = final.fetchFromGitHub;
70-
makeWrapper = final.makeWrapper;
71-
pkgs = final;
72-
};
61+
taxi-cli = final.callPackage ./pkgs.nix { };
7362
};
7463
};
7564
}

shell.nix

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ pkgs.mkShell {
77
pkgs.python3
88
pkgs.python3Packages.pip
99
pkgs.makeWrapper
10-
(pkgs.callPackage ./pkgs.nix {
11-
lib = pkgs.lib;
12-
python3 = pkgs.python3;
13-
makeWrapper = pkgs.makeWrapper;
14-
fetchFromGitHub = pkgs.fetchFromGitHub;
15-
pkgs = pkgs;
16-
}).taxi
10+
(pkgs.callPackage ./pkgs.nix { }).taxi
1711
];
1812
}

0 commit comments

Comments
 (0)