-
-
Save cleverca22/71ee5db254deb1e9469eeba0b037f90d to your computer and use it in GitHub Desktop.
runHaskell
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
let | |
pkgs = import <nixpkgs> {}; | |
runHaskell = name: deps: code: pkgs.runCommand name { buildInputs = [ (pkgs.haskellPackages.ghcWithPackages deps) ]; } '' | |
runhaskell ${pkgs.writeText "${name}.hs" code} | |
''; | |
in { | |
job1 = runHaskell "dummy" (ps: with ps; []) '' | |
import System.Environment | |
main = do | |
out <- getEnv "out" | |
writeFile out "test\n" | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment