24 lines
405 B
Bash
24 lines
405 B
Bash
|
#!/usr/bin/env nix-shell
|
||
|
#! nix-shell -i bash -p skopeo nix-prefetch-docker
|
||
|
|
||
|
set -euo pipefail
|
||
|
|
||
|
while [[ $# -gt 0 ]]; do
|
||
|
case $1 in
|
||
|
*)
|
||
|
echo "Unknown option $1"
|
||
|
exit 1
|
||
|
;;
|
||
|
esac
|
||
|
done
|
||
|
|
||
|
IMAGE=$(nix-prefetch-docker --image-name nixos/nix --image-tag latest --arch amd64 --os linux)
|
||
|
|
||
|
cat > ./pkgs/build-worker-oci/source.nix << EOF
|
||
|
{
|
||
|
dockerTools,
|
||
|
}:
|
||
|
|
||
|
dockerTools.pullImage ${IMAGE}
|
||
|
EOF
|