Skip to content

Instantly share code, notes, and snippets.

@cleverca22 cleverca22/default.nix Secret
Last active Aug 2, 2018

Embed
What would you like to do?
runHaskell
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
You can’t perform that action at this time.