nix-bundle/closure.sh

8 lines
194 B
Bash
Raw Normal View History

#!/usr/bin/env sh
target="$1"
expr="with import <nixpkgs> {}; with import ./. {}; closure { targets = [$target]; }"
nix-store --no-gc-warning -r $(nix-instantiate --no-gc-warning -E "$expr")