mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 13:30:36 +00:00
dub-to-nix: fetch submodules for git dependencies (#548514)
This commit is contained in:
@@ -41,6 +41,7 @@ let
|
||||
src = fetchgit {
|
||||
url = repository;
|
||||
rev = version;
|
||||
fetchSubmodules = true; # this is the default, but let's be explicit
|
||||
inherit sha256;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -57,7 +57,7 @@ for pname in depsDict:
|
||||
repository = depDict["repository"]
|
||||
strippedRepo = repository[4:]
|
||||
eprint(f"Fetching {pname}@{version} ({strippedRepo})")
|
||||
command = ["nix-prefetch-git", strippedRepo, version]
|
||||
command = ["nix-prefetch-git", "--fetch-submodules", strippedRepo, version]
|
||||
rawRes = subprocess.run(command, check=True, text=True, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL).stdout
|
||||
sha256 = json.loads(rawRes)["sha256"]
|
||||
lockedDepsDict[pname] = {"version": version, "repository": strippedRepo, "sha256": sha256}
|
||||
|
||||
Reference in New Issue
Block a user