Last active
July 20, 2020 01:59
-
-
Save unclechu/240a7e35a810e7d9095efc4a15b1305d to your computer and use it in GitHub Desktop.
Safe nix-shell Haskell script (with sha1sum validation of nixpkgs pick)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env nix-shell | |
#! nix-shell --pure -i runhaskell | |
#! nix-shell -E "with import (fetchTarball { url = \"https://github.com/NixOS/nixpkgs/archive/db31e48c5c8d99dcaf4e5883a96181f6ac4ad6f6.tar.gz\"; sha256 = \"1j5j7vbnq2i5zyl8498xrf490jca488iw6hylna3lfwji6rlcaqr\"; }) {}; mkShell { buildInputs = [(haskellPackages.ghcWithPackages (p: [p.servant p.servant-server]))]; }" | |
{-# LANGUAGE UnicodeSyntax #-} | |
import Servant | |
main ∷ IO () | |
main = putStrLn "foo" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment