Merge pull request #173576 from sternenseemann/xmonad-tests
[haskell-updates] release-haskell.nix: include nixos tests for xmonad
This commit is contained in:
commit
604120a374
2 changed files with 17 additions and 7 deletions
|
@ -13,7 +13,9 @@ let
|
|||
import System.Environment (getArgs)
|
||||
import System.FilePath ((</>))
|
||||
|
||||
main = launch $ def { startupHook = startup } `additionalKeysP` myKeys
|
||||
main = do
|
||||
dirs <- getDirectories
|
||||
launch (def { startupHook = startup } `additionalKeysP` myKeys) dirs
|
||||
|
||||
startup = isSessionStart >>= \sessInit ->
|
||||
spawn "touch /tmp/${name}"
|
||||
|
@ -23,14 +25,15 @@ let
|
|||
|
||||
compiledConfig = printf "xmonad-%s-%s" arch os
|
||||
|
||||
compileRestart resume =
|
||||
whenX (recompile True) $
|
||||
compileRestart resume = do
|
||||
dirs <- asks directories
|
||||
|
||||
whenX (recompile dirs True) $
|
||||
when resume writeStateToFile
|
||||
*> catchIO
|
||||
( do
|
||||
dir <- getXMonadDataDir
|
||||
args <- getArgs
|
||||
executeFile (dir </> compiledConfig) False args Nothing
|
||||
executeFile (cacheDir dirs </> compiledConfig) False args Nothing
|
||||
)
|
||||
'';
|
||||
|
||||
|
@ -94,7 +97,7 @@ in {
|
|||
|
||||
# set up the new config
|
||||
machine.succeed("mkdir -p ${user.home}/.xmonad")
|
||||
machine.copy_from_host("${newConfig}", "${user.home}/.xmonad/xmonad.hs")
|
||||
machine.copy_from_host("${newConfig}", "${user.home}/.config/xmonad/xmonad.hs")
|
||||
|
||||
# recompile xmonad using the new config
|
||||
machine.send_key("alt-ctrl-q")
|
||||
|
|
|
@ -144,7 +144,14 @@ let
|
|||
|
||||
tests.haskell = packagePlatforms pkgs.tests.haskell;
|
||||
|
||||
nixosTests.agda = (packagePlatforms pkgs.nixosTests).agda;
|
||||
nixosTests = {
|
||||
inherit (packagePlatforms pkgs.nixosTests)
|
||||
agda
|
||||
xmonad
|
||||
xmonad-xdg-autostart
|
||||
;
|
||||
};
|
||||
|
||||
agdaPackages = packagePlatforms pkgs.agdaPackages;
|
||||
|
||||
# top-level packages that depend on haskellPackages
|
||||
|
|
Loading…
Reference in a new issue