Skip to content

Instantly share code, notes, and snippets.

View mgttlinger's full-sized avatar

Merlin mgttlinger

  • FAU Erlangen-Nürnberg
  • Fichtelgebirge
View GitHub Profile
@mgttlinger
mgttlinger / nix-wrap
Created October 21, 2017 10:59 — forked from 3noch/nix-wrap
Command-line wrapper to put commands within a nix-shell using the nearest parent shell.nix file.
#!/usr/bin/env bash
# based on discussion: https://github.com/atom-haskell/haskell-ghc-mod/issues/160
origdir=$PWD
# Source nix env because this script is intended to be
# used by editors, e.g. Atom which doesn't source .bashrc,
# and we need NIX_PATH to be set correctly.
source /etc/profile