mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-26 09:08:57 +03:00
10 lines
332 B
Bash
Executable File
10 lines
332 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
nixpkgsFrom="${1:?missing nixpkgsFrom}"
|
|
|
|
flakeLock="$(echo "${nixpkgsFrom}" | cut -d# -f1)"
|
|
input="$(echo "${nixpkgsFrom}" | cut -d# -f2)"
|
|
|
|
jq -r <"${flakeLock}/flake.lock" '.nodes.root.inputs."'"${input}"'" as $name | .nodes | getpath([$name]).locked | "\(.type):\(.owner)/\(.repo)/\(.rev)"'
|