2020-10-03 09:55:28 +00:00
|
|
|
{
|
2020-10-19 15:45:49 +00:00
|
|
|
pkgs ? import (import ./nixpkgs-src.nix) {},
|
2020-11-25 08:27:46 +00:00
|
|
|
pypi_deps_db_commit ? ((import ./flake-inputs.nix) "pypi-deps-db").rev,
|
|
|
|
pypi_deps_db_sha256 ? ((import ./flake-inputs.nix) "pypi-deps-db").sha256,
|
2021-03-29 05:48:40 +00:00
|
|
|
deps_db_src ? fetchTarball {
|
2020-10-03 09:55:28 +00:00
|
|
|
name = "pypi-deps-db-src";
|
|
|
|
url = "https://github.com/DavHau/pypi-deps-db/tarball/${pypi_deps_db_commit}";
|
|
|
|
sha256 = "${pypi_deps_db_sha256}";
|
2021-03-29 05:48:40 +00:00
|
|
|
}
|
|
|
|
}:
|
|
|
|
with pkgs.lib;
|
|
|
|
let
|
2020-10-19 15:45:49 +00:00
|
|
|
pypi_fetcher_commit = removeSuffix "\n" (readFile "${deps_db_src}/PYPI_FETCHER_COMMIT");
|
|
|
|
pypi_fetcher_sha256 = removeSuffix "\n" (readFile "${deps_db_src}/PYPI_FETCHER_SHA256");
|
2020-10-03 09:55:28 +00:00
|
|
|
pypi_fetcher_src = fetchTarball {
|
|
|
|
name = "nix-pypi-fetcher-src";
|
|
|
|
url = "https://github.com/DavHau/nix-pypi-fetcher/tarball/${pypi_fetcher_commit}";
|
|
|
|
sha256 = "${pypi_fetcher_sha256}";
|
|
|
|
};
|
2020-10-07 18:50:34 +00:00
|
|
|
pypi_fetcher = import pypi_fetcher_src {
|
2020-10-07 16:36:08 +00:00
|
|
|
inherit pkgs;
|
|
|
|
};
|
2020-10-03 09:55:28 +00:00
|
|
|
in
|
2021-05-23 07:01:06 +00:00
|
|
|
{
|
2021-06-08 12:18:13 +00:00
|
|
|
# needs to be wrapped in a real derivation otherwise nix-build is not allowed,
|
|
|
|
# which is required for debugging
|
|
|
|
pypi_deps_db_src = pkgs.runCommand "pypi-deps-db" {} ''
|
|
|
|
ln -s ${deps_db_src} $out
|
|
|
|
'';
|
2021-05-23 07:01:06 +00:00
|
|
|
inherit
|
2020-10-19 15:45:49 +00:00
|
|
|
pypi_fetcher_src
|
|
|
|
pypi_fetcher_commit
|
|
|
|
pypi_fetcher_sha256
|
|
|
|
pypi_fetcher;
|
|
|
|
}
|