Forward shellPath on shell derivations
This commit is contained in:
parent
a06fc7d27f
commit
54d4c6c0e7
2 changed files with 8 additions and 0 deletions
|
|
@ -122,6 +122,9 @@ let
|
|||
# forward man pages
|
||||
// lib.optionalAttrs (exe ? man) { inherit (exe) man; }
|
||||
|
||||
# forward `shellPath`
|
||||
// lib.optionalAttrs (exe ? shellPath) { inherit (exe) shellPath; }
|
||||
|
||||
# forward `override`
|
||||
// lib.optionalAttrs (exe ? override) {
|
||||
override = overrideFn: jail name (exe.override overrideFn) permissions;
|
||||
|
|
|
|||
|
|
@ -73,6 +73,11 @@ spec = parallel $ inTestM $ do
|
|||
evalNixExpr [i| (jail "not-overridable" (sh "") []) ? override |]
|
||||
liftIO $ jailHasOverride `shouldBe` False
|
||||
|
||||
it "forwards shellPath from shell packages" $ do
|
||||
jailedBashShellPath :: String <-
|
||||
evalNixExpr [i| (jail "bash" pkgs.bash []).shellPath |]
|
||||
liftIO $ jailedBashShellPath `shouldBe` "/bin/bash"
|
||||
|
||||
describe "advanced configuration" $ do
|
||||
it "allows overriding base permissions shared across all jails" $ do
|
||||
tmpDir <- getTestDir
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue