#!/usr/bin/env rc

flag x +

if(~ $1 -x) {
    flake e +
    shift
}

pkg=$1
shift

exec nix run --impure 'nixpkgs#'^$pkg -- $*
