prefix nixpkgs# explicitly in nix_shell
This makes the function usage less confusing (you can now tell from the call side what are flags and what is passed to nix-shell) and allows to use different flakes to download packages.
This commit is contained in:
@@ -26,28 +26,30 @@ async def create_flake(directory: Path, url: str) -> dict[str, CmdOut]:
|
||||
out = await run(command, cwd=directory)
|
||||
response["flake init"] = out
|
||||
|
||||
command = nix_shell(["git"], ["git", "init"])
|
||||
command = nix_shell(["nixpkgs#git"], ["git", "init"])
|
||||
out = await run(command, cwd=directory)
|
||||
response["git init"] = out
|
||||
|
||||
command = nix_shell(["git"], ["git", "add", "."])
|
||||
command = nix_shell(["nixpkgs#git"], ["git", "add", "."])
|
||||
out = await run(command, cwd=directory)
|
||||
response["git add"] = out
|
||||
|
||||
# command = nix_shell(["git"], ["git", "config", "init.defaultBranch", "main"])
|
||||
# command = nix_shell(["nixpkgs#git"], ["git", "config", "init.defaultBranch", "main"])
|
||||
# out = await run(command, cwd=directory)
|
||||
# response["git config"] = out
|
||||
|
||||
command = nix_shell(["git"], ["git", "config", "user.name", "clan-tool"])
|
||||
command = nix_shell(["nixpkgs#git"], ["git", "config", "user.name", "clan-tool"])
|
||||
out = await run(command, cwd=directory)
|
||||
response["git config"] = out
|
||||
|
||||
command = nix_shell(["git"], ["git", "config", "user.email", "clan@example.com"])
|
||||
command = nix_shell(
|
||||
["nixpkgs#git"], ["git", "config", "user.email", "clan@example.com"]
|
||||
)
|
||||
out = await run(command, cwd=directory)
|
||||
response["git config"] = out
|
||||
|
||||
# TODO: Find out why this fails on Johannes machine
|
||||
# command = nix_shell(["git"], ["git", "commit", "-a", "-m", "Initial commit"])
|
||||
# command = nix_shell(["nixpkgs#git"], ["git", "commit", "-a", "-m", "Initial commit"])
|
||||
# out = await run(command, cwd=directory)
|
||||
# response["git commit"] = out
|
||||
|
||||
|
||||
Reference in New Issue
Block a user