Skip to content

Add name argument to builtins.fetchTarball and builtins.fetchgit #904

@domenkozar

Description

@domenkozar

Current behavior:

  • builtins.fetchTarball currently names the derivation after the url (words after last slash in the url)
  • builtins.fetchgit currently always names the derivation git-export
  • Hydra nix-prefetch-git currently names the derivation git-export (and has an old standing bug in that script of stripping anything that prefixes on .git instead of just .git folder, so .gitignore would also be deleted
  • nixpkgs nix-prefetch-git currently names the derivation after url and rev name

All in all, this leads to a lot of frustration since hashes of those derivations will differ. I'll try to fix the Hydra part (and look into since when nix-prefetch-git is crazy).

Mainly, I would hope that fetchTarball and fetchgit can be used interchangeably and it's currently not possible due to different hardcoded names.

cc @ocharles as he mentioned this recently on IRC
cc @edolstra

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions