Merge remote-tracking branch 'origin/nix/rust-1.65'

* origin/nix/rust-1.65:
  nix: update to rust-1.65

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
This commit is contained in:
Fintan Halpenny
2022-11-04 12:14:38 +00:00
8 changed files with 34 additions and 16 deletions
+1 -1
View File
@@ -251,7 +251,7 @@ fn discover(pack_dir: impl AsRef<Path>) -> Result<im::Vector<Arc<pack::Index>>,
let pack_dir = pack_dir.as_ref();
let pack_dir_disp = pack_dir.display();
trace!("discovering packs at {}", pack_dir_disp);
match fs::read_dir(&pack_dir) {
match fs::read_dir(pack_dir) {
Ok(iter) => {
let mut paths = Vec::new();
for entry in iter {
+1 -1
View File
@@ -149,7 +149,7 @@ where
)
.env("GIT_PROTOCOL", format!("version={}", protocol_version))
.env("GIT_NAMESPACE", namespace)
.args(&[
.args([
"-c",
"uploadpack.allowanysha1inwant=true",
"-c",
+1 -1
View File
@@ -74,7 +74,7 @@ where
.arg(format!("uploadpack.hiderefs=!{}", r.as_bstr()));
}
cmd.args(&[
cmd.args([
"upload-pack",
"--strict",
"--timeout=5",
+6 -6
View File
@@ -5,10 +5,10 @@
"homepage": "https://github.com/nmattia/niv",
"owner": "nmattia",
"repo": "niv",
"rev": "82e5cd1ad3c387863f0545d7591512e76ab0fc41",
"sha256": "090l219mzc0gi33i3psgph6s2pwsc8qy4lyrqjdj4qzkvmaj65a7",
"rev": "351d8bc316bf901a81885bab5f52687ec8ccab6e",
"sha256": "1yzhz7ihkh6p2sxhp3amqfbmm2yqzaadqqii1xijymvl8alw5rrr",
"type": "tarball",
"url": "https://github.com/nmattia/niv/archive/82e5cd1ad3c387863f0545d7591512e76ab0fc41.tar.gz",
"url": "https://github.com/nmattia/niv/archive/351d8bc316bf901a81885bab5f52687ec8ccab6e.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs": {
@@ -29,10 +29,10 @@
"homepage": "",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "9e319dd18f7beadab4daaf2426466d4023c1d26f",
"sha256": "0fizgamhrypmmkxzhd02r7j7151d03xsxcsw7135py836x6fmq62",
"rev": "cf668f737ac986c0a89e83b6b2e3c5ddbd8cf33b",
"sha256": "0xaswxxjkx5fjjl1c7gp27qajvpl9qsi0rmj044hhmjrrlpb6nvd",
"type": "tarball",
"url": "https://github.com/oxalica/rust-overlay/archive/9e319dd18f7beadab4daaf2426466d4023c1d26f.tar.gz",
"url": "https://github.com/oxalica/rust-overlay/archive/cf668f737ac986c0a89e83b6b2e3c5ddbd8cf33b.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
+21 -1
View File
@@ -31,8 +31,28 @@ let
if spec ? branch then "refs/heads/${spec.branch}" else
if spec ? tag then "refs/tags/${spec.tag}" else
abort "In git source '${name}': Please specify `ref`, `tag` or `branch`!";
submodules = if spec ? submodules then spec.submodules else false;
submoduleArg =
let
nixSupportsSubmodules = builtins.compareVersions builtins.nixVersion "2.4" >= 0;
emptyArgWithWarning =
if submodules == true
then
builtins.trace
(
"The niv input \"${name}\" uses submodules "
+ "but your nix's (${builtins.nixVersion}) builtins.fetchGit "
+ "does not support them"
)
{}
else {};
in
if nixSupportsSubmodules
then { inherit submodules; }
else emptyArgWithWarning;
in
builtins.fetchGit { url = spec.repo; inherit (spec) rev; inherit ref; };
builtins.fetchGit
({ url = spec.repo; inherit (spec) rev; inherit ref; } // submoduleArg);
fetch_local = spec: spec.path;
+1 -3
View File
@@ -81,9 +81,7 @@ impl<'a> Blob<'a> {
let reference = match branch {
Branch::Name(name) => {
git.find_reference(&name).or_matches(is_not_found_err, || {
Err(Error::NotFound(NotFound::NoSuchBranch(
name.to_owned().to_string(),
)))
Err(Error::NotFound(NotFound::NoSuchBranch(name.into_owned())))
})
},
+2 -2
View File
@@ -32,7 +32,7 @@ pub fn reflike(input: TokenStream) -> TokenStream {
match RefLike::try_from(lit.value()) {
Ok(safe) => {
let safe: &str = &*safe;
let safe: &str = &safe;
let expand = quote! { unsafe { ::std::mem::transmute::<_, ::radicle_git_ext::RefLike>(#safe.to_owned()) }};
TokenStream::from(expand)
},
@@ -60,7 +60,7 @@ pub fn refspec_pattern(input: TokenStream) -> TokenStream {
match RefspecPattern::try_from(lit.value()) {
Ok(safe) => {
let safe: &str = &*safe;
let safe: &str = &safe;
let expand = quote! { unsafe { ::std::mem::transmute::<_, ::radicle_git_ext::RefspecPattern>(#safe.to_owned()) }};
TokenStream::from(expand)
},
+1 -1
View File
@@ -159,7 +159,7 @@ impl Revision for Oid {
impl Revision for &str {
fn object_id(&self, _repo: &RepositoryRef) -> Result<Oid, Error> {
Oid::from_str(*self).map_err(Error::Git)
Oid::from_str(self).map_err(Error::Git)
}
}