Skip to content

Commit

Permalink
fetchers: Drop fetchFromLegacy
Browse files Browse the repository at this point in the history
It's been upstreamed to nixpkgs in NixOS/nixpkgs#266853
  • Loading branch information
adisbladis committed Feb 17, 2024
1 parent 4e0c84f commit ef61ffc
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 281 deletions.
3 changes: 1 addition & 2 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ pkgs, lib }:
{ lib }:
{
lib = import ./lib { inherit lib; };
fetchers = pkgs.callPackage ./fetchers { };
}
1 change: 0 additions & 1 deletion doc/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
- [project](./lib/project.nix)
- [renderers](./lib/renderers.nix)
- [validators](./lib/validators.nix)
- [fetchers](./fetchers/default.nix)
- [Standards APIs](./reference.md)
- [pep440](./lib/pep440.nix)
- [pep508](./lib/pep508.nix)
Expand Down
1 change: 0 additions & 1 deletion doc/src/fetchers

This file was deleted.

66 changes: 0 additions & 66 deletions fetchers/default.nix

This file was deleted.

161 changes: 0 additions & 161 deletions fetchers/fetch-from-legacy.py

This file was deleted.

21 changes: 0 additions & 21 deletions flake-module.nix

This file was deleted.

14 changes: 3 additions & 11 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
inputs.treefmt-nix.flakeModule
inputs.flake-root.flakeModule
inputs.proc-flake.flakeModule
./flake-module.nix
];

flake.githubActions = nix-github-actions.lib.mkGithubMatrix {
Expand Down Expand Up @@ -79,18 +78,10 @@
{
treefmt.imports = [ ./dev/treefmt.nix ];

checks = pkgs.callPackages ./test
{
pyproject = import ./default.nix { inherit pkgs lib; };
} // self.packages.${system} // {
mypy = pkgs.runCommand "pyproject.nix-mypy" { nativeBuildInputs = [ pkgs.python3.pkgs.mypy ]; } ''
mypy --exclude doc --strict ${self}
touch $out
'';
checks = pkgs.callPackages ./test {
pyproject = import ./default.nix { inherit lib; };
};

fetchers = pkgs.callPackage ./fetchers { };

proc.groups.run.processes = {
nix-unittest.command = "${lib.getExe' pkgs.reflex "reflex"} -r '\.(nix)$' -- ${lib.getExe' pkgs.nix-unit "nix-unit"} --quiet --flake '.#libTests'";
mdbook.command = "(cd doc && mdbook serve)";
Expand All @@ -102,6 +93,7 @@
config.proc.groups.run.package
pkgs.nix-unit
inputs.mdbook-nixdoc.packages.${system}.default
(pkgs.python3.withPackages (_ps: [ ]))
] ++ self.packages.${system}.doc.nativeBuildInputs;
};

Expand Down
19 changes: 1 addition & 18 deletions test/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ lib.mapAttrs'
}
)
projects
// (
// (
lib.mapAttrs'
(
n: project: {
Expand Down Expand Up @@ -113,20 +113,3 @@ lib.mapAttrs'
)
projects
)
//
# Test fetchFromLegacy
lib.mapAttrs'
(
n: args: {
name = "fetchers_fetchFromLegacy-${n}";
value = pyproject.fetchers.fetchFromLegacy args;
}
)
{
urllib3 = {
file = "urllib3-1.26.2.tar.gz";
hash = "sha256:19188f96923873c92ccb987120ec4acaa12f0461fa9ce5d3d0772bc965a39e08";
pname = "urllib3";
url = "https://pypi.org/simple";
};
}

0 comments on commit ef61ffc

Please sign in to comment.