Skip to content

Instantly share code, notes, and snippets.

@infinisil
Forked from dustinlacewell-wk/emacs.default.nix
Created October 13, 2017 18:31
Show Gist options
  • Save infinisil/d0a3c51a10ec1536474cb6868ccdc718 to your computer and use it in GitHub Desktop.
Save infinisil/d0a3c51a10ec1536474cb6868ccdc718 to your computer and use it in GitHub Desktop.
with import <nixpkgs> {};
runCommand "dot-emacs" {
# buildInputs could be here, but it doesn't do what you thought it would
} ''
mkdir -p $out
echo "Hello World" > $out/emacs.cfg
''
#> nix-build ~/src/dotfiles
these derivations will be built:
/nix/store/24l8p5md7jn8x7sgx5g2xgk6qflm0vkj-dot-weechat.drv
/nix/store/9kig1f2jkjkvb5dxpp46zw8p691k3k5l-dot-emacs.drv
building path(s) ‘/nix/store/19i5gygdx9pa2xzzak4blg6iwjl1p8kv-dot-emacs’
building path(s) ‘/nix/store/m065zv7x2cfpr2jr1lwzakkv19dip3jw-dot-weechat’
/nix/store/19i5gygdx9pa2xzzak4blg6iwjl1p8kv-dot-emacs
/nix/store/m065zv7x2cfpr2jr1lwzakkv19dip3jw-dot-weechat
#> ls -la
total 16
drwxr-xr-x 4 dustinlacewell wheel 136 Oct 13 12:32 .
drwxrwxrwt 32 root wheel 1088 Oct 13 12:32 ..
lrwxr-xr-x 1 dustinlacewell wheel 53 Oct 13 12:32 result -> /nix/store/19i5gygdx9pa2xzzak4blg6iwjl1p8kv-dot-emacs
lrwxr-xr-x 1 dustinlacewell wheel 55 Oct 13 12:32 result-2 -> /nix/store/m065zv7x2cfpr2jr1lwzakkv19dip3jw-dot-weechat
#> ls result/
emacs.cfg
#> ls result-2/
weechat.cfg
with import <nixpkgs> {};
runCommand "dot-weechat" {
} ''
mkdir -p $out
echo "Hello World" > $out/weechat.cfg
''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment