citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

nix-pkg (274B)


      1 #!/usr/bin/env sh
      2 cmd="$1"
      3 
      4 usage () {
      5   echo "nix-pkg <build|shell|instantiate> [OPTIONS]..."
      6   exit 1
      7 }
      8 
      9 [[ "$cmd" = "build" ||
     10    "$cmd" = "shell" ||
     11    "$cmd" = "instantiate"
     12 ]] || usage
     13 
     14 shift
     15 
     16 nix-${cmd} -E 'with import <nixpkgs> {}; callPackage ./default.nix {}' $@
     17