shell.nix 726 B

123456789101112131415161718192021222324252627
  1. { pkgs ? import <nixpkgs> {} }:
  2. let
  3. # todo this should be automatic at some point in time
  4. createReadme = pkgs.writeShellScriptBin "create-readme" /* sh */ ''
  5. ${pkgs.pandoc}/bin/pandoc \
  6. -s \
  7. ${toString ./doc/10_intro.md} \
  8. ${toString ./doc/20_example.md} \
  9. ${toString ./example/shell.nix} \
  10. ${toString ./doc/21_example.md} \
  11. ${toString ./doc/50_tmpfs.md} \
  12. -f markdown -t markdown \
  13. -o ${toString ./README.md}
  14. '';
  15. in
  16. pkgs.mkShell {
  17. buildInputs = with pkgs; [
  18. pkgs.haskellPackages.pandoc
  19. createReadme
  20. ];
  21. shellHook = ''
  22. HISTFILE=${toString ./.}/.history
  23. '';
  24. }