-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: introduce
repoToName
, use it in all the fetchers tree-wide
Motivation: Paths like "/nix/store/<hash>-source" are not particularly informative. This patch changes those paths to "/nix/store/<hash>-<name>-<version>-<fetcher>-source" by default. Pros: - Sources in /nix/store become easily discoverable. - "These derivations will be built" list becomes more informative. - This generalizes a bunch of copy-paste from the fetchers into a single function. - It becomes harder to screw up `src` definitions (see previous patches in this patchset). Cons: - `nix-prefetch-(git|svn|etc)` will produce different paths. That can be fixed, but I didn't feel like reimplementing `repoToName` in shell. I would really like nix to get `nix prefetch` command that would do the fixed-outputs builds without checking the hashes instead. - This introduces a negative effect on the allocations metric of about 0.2% and some unmeasurable negative effect on the time metric that gets lost in the jitter.
- Loading branch information
Showing
9 changed files
with
85 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
source $stdenv/setup | ||
header "getting $url${rev:+ ($rev)} into $out" | ||
header "getting $url ($rev) into $out" | ||
|
||
hg clone --insecure "$url" hg-clone | ||
|
||
hg archive -q$subrepoClause -y ${rev:+-r "$rev"} --cwd hg-clone $out | ||
hg archive -q$subrepoClause -y -r "$rev" --cwd hg-clone $out | ||
rm -f $out/.hg_archival.txt | ||
|
||
stopNest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters