mirror of
https://github.com/bennofs/nix-script
synced 2025-01-10 04:44:21 +01:00
Rename module (must be called Main)
This commit is contained in:
parent
a3a56c2dbb
commit
332c94e05a
@ -1,5 +1,5 @@
|
|||||||
-- | A shebang for running scripts inside nix-shell with defined dependencies
|
-- | A shebang for running scripts inside nix-shell with defined dependencies
|
||||||
module NixScript where
|
module Main where
|
||||||
|
|
||||||
import Control.Monad (when)
|
import Control.Monad (when)
|
||||||
import Data.Maybe (fromMaybe)
|
import Data.Maybe (fromMaybe)
|
||||||
@ -128,6 +128,7 @@ main = do
|
|||||||
(program, args) = interpreter language interactive file
|
(program, args) = interpreter language interactive file
|
||||||
|
|
||||||
cmd <- makeCommand program args
|
cmd <- makeCommand program args
|
||||||
|
putStrLn $ unwords ("--pure" : "--command" : cmd : "-p" : pkgs)
|
||||||
callProcess "nix-shell" ("--pure" : "--command" : cmd : "-p" : pkgs)
|
callProcess "nix-shell" ("--pure" : "--command" : cmd : "-p" : pkgs)
|
||||||
|
|
||||||
_ -> fail "missing or invalid header"
|
_ -> fail "missing or invalid header"
|
Loading…
Reference in New Issue
Block a user