sane-clone: simplify to not use jq

This commit is contained in:
Colin 2023-11-27 10:22:45 +00:00
parent a94c460a95
commit ae5dee394c
2 changed files with 5 additions and 5 deletions

View File

@ -69,7 +69,7 @@ let
clone = static-nix-shell.mkBash {
pname = "sane-clone";
src = ./src;
pkgs = [ "jq" "nix" ];
pkgs = [ "nix" ];
};
deadlines = static-nix-shell.mkBash {
pname = "sane-deadlines";

View File

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p jq -p nix
#!nix-shell -i bash -p nix
# use like `eval $(sane-clone tuba)` to clone and cd into a tuba checkout
@ -8,9 +8,9 @@ basedir=/home/colin/ref/repos
# fetchFromGitHub: provides src.{gitRepoUrl,owner,repo}
# fetchFromGitLab: provides src.gitRepoUrl only
repourl="$(nix eval nixpkgs#$srcattr.gitRepoUrl | jq --raw-output)"
repoowner="$(nix eval nixpkgs#$srcattr.owner | jq --raw-output)"
reponame="$(nix eval nixpkgs#$srcattr.repo | jq --raw-output)"
repourl="$(nix eval --raw nixpkgs#$srcattr.gitRepoUrl)"
repoowner="$(nix eval --raw nixpkgs#$srcattr.owner)"
reponame="$(nix eval --raw nixpkgs#$srcattr.repo)"
ownerdir="$basedir/$repoowner"
clonedir="$ownerdir/$reponame"