@@ -417,13 +417,6 @@ fetchzips <- function(archive_pkgs) {
417417# ' @return Nix definition string for building the packages
418418# ' @noRd
419419fetchpkgs <- function (git_pkgs , archive_pkgs ) {
420- # Only include git packages that aren't already remote dependencies
421- if (all(sapply(git_pkgs , is.list ))) {
422- all_remotes <- unique(unlist(lapply(git_pkgs , get_remote )))
423- git_pkgs <- git_pkgs [! sapply(git_pkgs , function (pkg ) {
424- pkg $ package_name %in% all_remotes
425- })]
426- }
427420
428421 # Combine git and archive package definitions
429422 paste(
@@ -433,21 +426,6 @@ fetchpkgs <- function(git_pkgs, archive_pkgs) {
433426 )
434427}
435428
436- # ' get_remote Retrieves the names of remote dependencies for a given Git package
437- # ' @param git_pkg A list of three elements: "package_name", the name of the
438- # ' package, "repo_url", the repository's URL, and "commit", the commit hash of
439- # ' interest.
440- # ' @return A character vector containing the names of remote dependencies.
441- # ' @noRd
442- get_remote <- function (git_pkg ) {
443- repo_url <- git_pkg $ repo_url
444- commit <- git_pkg $ commit
445- output <- get_sri_hash_deps(repo_url , commit )
446- remotes <- output $ deps $ remotes
447- remote_package_names <- sapply(remotes , `[[` , " package_name" )
448- return (remote_package_names )
449- }
450-
451429# ' get_commit_date Retrieves the date of a commit from a Git repository
452430# ' @param repo The GitHub repository (e.g. "r-lib/usethis")
453431# ' @param commit_sha The commit hash of interest
0 commit comments