1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-21 23:40:24 -04:00
nix/src/libexpr/primops/fetchgit.hh
Eelco Dolstra 65b5f177b5
builtins.fetchgit: Support a "name" attribute
The "name" attribute defaults to "source", which we should use for all
similar functions (e.g. fetchTarball and in Hydra) to ensure that we
get a consistent store path regardless of how the tree is fetched.

"source" is not necessarily a correct label, but using an empty name
is problematic: you get an ugly store path ending in a dash, and it's
impossible to have a fixed-output derivation that produces that path
because ".drv" is not a valid store name.

Fixes #904.
2017-10-30 10:22:07 +01:00

16 lines
239 B
C++

#pragma once
#include <string>
#include "ref.hh"
namespace nix {
class Store;
Path exportGit(ref<Store> store, const std::string & uri,
const std::string & ref, const std::string & rev = "",
const std::string & name = "");
}