mirror of
https://github.com/bennofs/nix-script
synced 2025-01-10 04:44:21 +01:00
commit
45be874115
@ -32,7 +32,7 @@ data LangDef = LangDef
|
|||||||
}
|
}
|
||||||
|
|
||||||
languages :: [LangDef]
|
languages :: [LangDef]
|
||||||
languages = [haskell, shell]
|
languages = [haskell, python, javascript, perl, shell]
|
||||||
|
|
||||||
haskell :: LangDef
|
haskell :: LangDef
|
||||||
haskell = LangDef "haskell" d r i where
|
haskell = LangDef "haskell" d r i where
|
||||||
@ -41,6 +41,24 @@ haskell = LangDef "haskell" d r i where
|
|||||||
r script = ("runhaskell" , [script])
|
r script = ("runhaskell" , [script])
|
||||||
i script = ("ghci" , [script])
|
i script = ("ghci" , [script])
|
||||||
|
|
||||||
|
python :: LangDef
|
||||||
|
python = LangDef "python" d r i where
|
||||||
|
d pkgs = "python" : map ("pythonPackages." <>) pkgs
|
||||||
|
r script = ("python" , [script])
|
||||||
|
i script = ("python" , ["-i", script])
|
||||||
|
|
||||||
|
javascript :: LangDef
|
||||||
|
javascript = LangDef "javascript" d r i where
|
||||||
|
d pkgs = "node" : map ("nodePackages." <>) pkgs
|
||||||
|
r script = ("node" , [script])
|
||||||
|
i script = ("node" , [])
|
||||||
|
|
||||||
|
perl :: LangDef
|
||||||
|
perl = LangDef "perl" d r i where
|
||||||
|
d pkgs = "perl" : map ("perlPackages." <>) pkgs
|
||||||
|
r script = ("perl" , [script])
|
||||||
|
i script = ("perl" , ["-d", script])
|
||||||
|
|
||||||
shell :: LangDef
|
shell :: LangDef
|
||||||
shell = LangDef "shell" (extraPackages ++) r i where
|
shell = LangDef "shell" (extraPackages ++) r i where
|
||||||
r script = ("bash", [script])
|
r script = ("bash", [script])
|
||||||
|
Loading…
Reference in New Issue
Block a user