    {-# LANGUAGE FlexibleContexts #-}

    module Propellor.Property.SiteSpecific.GitAnnexBuilder where

    import Propellor.Base
    import qualified Propellor.Property.Apt as Apt
    import qualified Propellor.Property.User as User
    import qualified Propellor.Property.Cron as Cron
    import qualified Propellor.Property.File as File
    import qualified Propellor.Property.Systemd as Systemd
    import qualified Propellor.Property.Chroot as Chroot
    import Propellor.Property.Cron (Times)
    import Propellor.Property.Debootstrap

    builduser :: UserName
    builduser :: String
    builduser = String
    "builder"

    homedir :: FilePath
    homedir :: String
    homedir = String
    "/home/builder"

    gitbuilderdir :: FilePath
    gitbuilderdir :: String
    gitbuilderdir = String
    homedir String -> String -> String
    </> String
    "gitbuilder"

    builddir :: FilePath
    builddir :: String
    builddir = String
    gitbuilderdir String -> String -> String
    </> String
    "build"

    type TimeOut = String -- eg, 5h

    type ArchString = String

    autobuilder :: ArchString -> Times -> TimeOut -> Property (HasInfo + DebianLike)
    autobuilder :: String -> Times -> String -> Property (HasInfo + DebianLike)
    autobuilder String
    arch Times
    crontimes String
    timeout = String
    -> Props
         (MetaTypes
            '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
    -> Property
         (MetaTypes
            '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
    forall {k} (metatypes :: k).
    SingI metatypes =>
    String
    -> Props (MetaTypes metatypes) -> Property (MetaTypes metatypes)
    combineProperties String
    "gitannexbuilder" (Props
       (MetaTypes
          '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
     -> Property
          (MetaTypes
             '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    -> Props
         (MetaTypes
            '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
    -> Property
         (MetaTypes
            '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
    forall a b. (a -> b) -> a -> b
    $ Props UnixLike
    props
    	Props UnixLike
    -> Property DebianLike
    -> Props
         (MetaTypes
            (Combine
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & String -> Property DebianLike
    Apt.serviceInstalledRunning String
    "cron"
    	Props DebianLike
    -> Property DebianLike
    -> Props
         (Sing
            (Combine
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & String -> Times -> User -> String -> String -> Property DebianLike
    Cron.niceJob String
    "gitannexbuilder" Times
    crontimes (String -> User
    User String
    builduser) String
    gitbuilderdir
    		(String
    "git pull ; timeout " String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    timeout String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    " ./autobuild")
    	Props
      (Sing
         (Combine
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    -> Property
         (MetaTypes
            '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
    -> Props
         (MetaTypes
            (Combine
               (Combine
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & Property
      (MetaTypes
         '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
    Property (HasInfo + DebianLike)
    rsyncpassword
      where
    	context :: Context
    context = String -> Context
    Context (String
    "gitannexbuilder " String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    arch)
    	pwfile :: String
    pwfile = String
    homedir String -> String -> String
    </> String
    "rsyncpassword"
    	-- The builduser account does not have a password set,
    	-- instead use the password privdata to hold the rsync server
    	-- password used to upload the built image.
    	rsyncpassword :: Property (HasInfo + DebianLike)
    	rsyncpassword :: Property (HasInfo + DebianLike)
    rsyncpassword = PrivDataField
    -> Context
    -> (((PrivData -> Propellor Result) -> Propellor Result)
        -> Property (HasInfo + DebianLike))
    -> Property (HasInfo + DebianLike)
    forall c s metatypes.
    (IsContext c, IsPrivDataSource s,
     IncludesInfo metatypes ~ 'True) =>
    s
    -> c
    -> (((PrivData -> Propellor Result) -> Propellor Result)
        -> Property metatypes)
    -> Property metatypes
    withPrivData (String -> PrivDataField
    Password String
    builduser) Context
    context ((((PrivData -> Propellor Result) -> Propellor Result)
      -> Property (HasInfo + DebianLike))
     -> Property (HasInfo + DebianLike))
    -> (((PrivData -> Propellor Result) -> Propellor Result)
        -> Property (HasInfo + DebianLike))
    -> Property (HasInfo + DebianLike)
    forall a b. (a -> b) -> a -> b
    $ \(PrivData -> Propellor Result) -> Propellor Result
    getpw ->
    		String
    -> Propellor Result
    -> Property
         (MetaTypes
            '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
    forall {k} (metatypes :: k).
    SingI metatypes =>
    String -> Propellor Result -> Property (MetaTypes metatypes)
    property String
    "rsync password" (Propellor Result
     -> Property
          (MetaTypes
             '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    -> Propellor Result
    -> Property
         (MetaTypes
            '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
    forall a b. (a -> b) -> a -> b
    $ (PrivData -> Propellor Result) -> Propellor Result
    getpw ((PrivData -> Propellor Result) -> Propellor Result)
    -> (PrivData -> Propellor Result) -> Propellor Result
    forall a b. (a -> b) -> a -> b
    $ \PrivData
    pw -> do
    			String
    have <- IO String -> Propellor String
    forall a. IO a -> Propellor a
    forall (m :: * -> *) a. MonadIO m => IO a -> m a
    liftIO (IO String -> Propellor String) -> IO String -> Propellor String
    forall a b. (a -> b) -> a -> b
    $ String -> IO String -> IO String
    forall (m :: * -> *) a. MonadCatch m => a -> m a -> m a
    catchDefaultIO String
    "" (IO String -> IO String) -> IO String -> IO String
    forall a b. (a -> b) -> a -> b
    $
    				String -> IO String
    readFileStrict String
    pwfile
    			let want :: String
    want = PrivData -> String
    privDataVal PrivData
    pw
    			if String
    want String -> String -> Bool
    forall a. Eq a => a -> a -> Bool
    /= String
    have
    				then IO () -> Propellor Result
    makeChange (IO () -> Propellor Result) -> IO () -> Propellor Result
    forall a b. (a -> b) -> a -> b
    $ String -> String -> IO ()
    writeFile String
    pwfile String
    want
    				else Propellor Result
    noChange

    tree :: ArchString -> Flavor -> Property DebianLike
    tree :: String -> Flavor -> Property DebianLike
    tree String
    buildarch Flavor
    flavor = String -> Props DebianLike -> Property DebianLike
    forall {k} (metatypes :: k).
    SingI metatypes =>
    String
    -> Props (MetaTypes metatypes) -> Property (MetaTypes metatypes)
    combineProperties String
    "gitannexbuilder tree" (Props DebianLike -> Property DebianLike)
    -> Props DebianLike -> Property DebianLike
    forall a b. (a -> b) -> a -> b
    $ Props UnixLike
    props
    	Props UnixLike
    -> Property DebianLike
    -> Props
         (MetaTypes
            (Combine
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & [String] -> Property DebianLike
    Apt.installed [String
    "git"]
    	Props DebianLike
    -> Property UnixLike
    -> Props
         (Sing
            (Combine
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & String -> Property UnixLike
    File.dirExists String
    gitbuilderdir
    	Props
      (Sing
         (Combine
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> Property UnixLike
    -> Props
         (Sing
            (Combine
               (Combine
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & String -> User -> Group -> Property UnixLike
    File.ownerGroup String
    gitbuilderdir (String -> User
    User String
    builduser) (String -> Group
    Group String
    builduser)
    	Props
      (Sing
         (Combine
            (Combine
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> Property UnixLike
    -> Props
         (Sing
            (Combine
               (Combine
                  (Combine
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & Property UnixLike
    gitannexbuildercloned
    	Props
      (Sing
         (Combine
            (Combine
               (Combine
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> Property UnixLike
    -> Props
         (MetaTypes
            (Combine
               (Combine
                  (Combine
                     (Combine
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & Property UnixLike
    builddircloned
      where
    	gitannexbuildercloned :: Property UnixLike
    gitannexbuildercloned = IO Bool -> Property UnixLike -> Property UnixLike
    forall (p :: * -> *) i (m :: * -> *).
    (Checkable p i, LiftPropellor m) =>
    m Bool -> p i -> Property i
    check (Bool -> Bool
    not (Bool -> Bool) -> IO Bool -> IO Bool
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> (String -> IO Bool
    doesDirectoryExist (String
    gitbuilderdir String -> String -> String
    </> String
    ".git"))) (Property UnixLike -> Property UnixLike)
    -> Property UnixLike -> Property UnixLike
    forall a b. (a -> b) -> a -> b
    $
    		User -> [String] -> UncheckedProperty UnixLike
    userScriptProperty (String -> User
    User String
    builduser)
    			[ String
    "git clone git://git.kitenet.net/gitannexbuilder " String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    gitbuilderdir
    			, String
    "cd " String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    gitbuilderdir
    			, String
    "git checkout " String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    buildarch String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String -> Flavor -> String
    forall a. a -> Maybe a -> a
    fromMaybe String
    "" Flavor
    flavor
    			]
    			UncheckedProperty UnixLike -> Result -> Property UnixLike
    forall (p :: * -> *) i.
    Checkable p i =>
    p i -> Result -> Property i
    `assume` Result
    MadeChange
    			Property UnixLike -> String -> Property UnixLike
    forall p. IsProp p => p -> String -> p
    `describe` String
    "gitbuilder setup"
    	builddircloned :: Property UnixLike
    builddircloned = IO Bool -> UncheckedProperty UnixLike -> Property UnixLike
    forall (p :: * -> *) i (m :: * -> *).
    (Checkable p i, LiftPropellor m) =>
    m Bool -> p i -> Property i
    check (Bool -> Bool
    not (Bool -> Bool) -> IO Bool -> IO Bool
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> String -> IO Bool
    doesDirectoryExist String
    builddir) (UncheckedProperty UnixLike -> Property UnixLike)
    -> UncheckedProperty UnixLike -> Property UnixLike
    forall a b. (a -> b) -> a -> b
    $ User -> [String] -> UncheckedProperty UnixLike
    userScriptProperty (String -> User
    User String
    builduser)
    		[ String
    "git clone git://git-annex.branchable.com/ " String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    builddir
    		]

    buildDepsApt :: Property DebianLike
    buildDepsApt :: Property DebianLike
    buildDepsApt = String -> Props DebianLike -> Property DebianLike
    forall {k} (metatypes :: k).
    SingI metatypes =>
    String
    -> Props (MetaTypes metatypes) -> Property (MetaTypes metatypes)
    combineProperties String
    "gitannexbuilder build deps" (Props DebianLike -> Property DebianLike)
    -> Props DebianLike -> Property DebianLike
    forall a b. (a -> b) -> a -> b
    $ Props UnixLike
    props
    	Props UnixLike
    -> Property DebianLike
    -> Props
         (MetaTypes
            (Combine
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & [String] -> Property DebianLike
    Apt.buildDep [String
    "git-annex"]
    	Props DebianLike
    -> Property DebianLike
    -> Props
         (Sing
            (Combine
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & Property DebianLike
    buildDepsNoHaskellLibs
    	Props
      (Sing
         (Combine
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    -> Property DebianLike
    -> Props
         (MetaTypes
            (Combine
               (Combine
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & String -> Property DebianLike
    Apt.buildDepIn String
    builddir
    		Property DebianLike -> String -> Property DebianLike
    forall p. IsProp p => p -> String -> p
    `describe` String
    "git-annex source build deps installed"

    buildDepsNoHaskellLibs :: Property DebianLike
    buildDepsNoHaskellLibs :: Property DebianLike
    buildDepsNoHaskellLibs = [String] -> Property DebianLike
    Apt.installed
    	[String
    "git", String
    "rsync", String
    "moreutils", String
    "ca-certificates",
    	String
    "debhelper", String
    "ghc", String
    "curl", String
    "openssh-client", String
    "git-remote-gcrypt",
    	String
    "liblockfile-simple-perl", String
    "locales", String
    "cabal-install", String
    "vim", String
    "less",
    	-- needed by haskell libs
    	String
    "libxml2-dev", String
    "libidn11-dev", String
    "libgsasl7-dev", String
    "libgnutls28-dev",
    	String
    "libmagic-dev", String
    "alex", String
    "happy", String
    "c2hs"
    	]

    haskellPkgsInstalled :: String -> Property DebianLike
    haskellPkgsInstalled :: String -> Property DebianLike
    haskellPkgsInstalled String
    dir = Property UnixLike -> Property DebianLike
    forall (untightened :: [MetaType]) (tightened :: [MetaType]).
    (TightenTargetsAllowed untightened tightened, SingI tightened) =>
    Property (MetaTypes untightened) -> Property (MetaTypes tightened)
    forall (p :: * -> *) (untightened :: [MetaType])
           (tightened :: [MetaType]).
    (TightenTargets p, TightenTargetsAllowed untightened tightened,
     SingI tightened) =>
    p (MetaTypes untightened) -> p (MetaTypes tightened)
    tightenTargets (Property UnixLike -> Property DebianLike)
    -> Property UnixLike -> Property DebianLike
    forall a b. (a -> b) -> a -> b
    $
    	Property UnixLike -> String -> Property UnixLike
    forall i. Property i -> String -> Property i
    flagFile Property UnixLike
    go (String
    "/haskellpkgsinstalled")
      where
    	go :: Property UnixLike
    go = User -> [String] -> UncheckedProperty UnixLike
    userScriptProperty (String -> User
    User String
    builduser)
    		[ String
    "cd " String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    builddir String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    " && ./standalone/" String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    dir String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    "/install-haskell-packages"
    		]
    		UncheckedProperty UnixLike -> Result -> Property UnixLike
    forall (p :: * -> *) i.
    Checkable p i =>
    p i -> Result -> Property i
    `assume` Result
    MadeChange

    -- Installs current versions of git-annex's deps from cabal, but only
    -- does so once.
    cabalDeps :: Property UnixLike
    cabalDeps :: Property UnixLike
    cabalDeps = Property UnixLike -> String -> Property UnixLike
    forall i. Property i -> String -> Property i
    flagFile Property UnixLike
    go String
    cabalupdated
    	where
    		go :: Property UnixLike
    go = User -> [String] -> UncheckedProperty UnixLike
    userScriptProperty (String -> User
    User String
    builduser)
    			[String
    "cabal update && cabal install git-annex --only-dependencies || true"]
    			UncheckedProperty UnixLike -> Result -> Property UnixLike
    forall (p :: * -> *) i.
    Checkable p i =>
    p i -> Result -> Property i
    `assume` Result
    MadeChange
    		cabalupdated :: String
    cabalupdated = String
    homedir String -> String -> String
    </> String
    ".cabal" String -> String -> String
    </> String
    "packages" String -> String -> String
    </> String
    "hackage.haskell.org" String -> String -> String
    </> String
    "00-index.cache"

    autoBuilderContainer :: (DebianSuite -> Architecture -> Flavor -> Property (HasInfo + Debian)) -> DebianSuite -> Architecture -> DebootstrapConfig -> Flavor -> Times -> TimeOut -> Systemd.Container
    autoBuilderContainer :: (DebianSuite
     -> Architecture -> Flavor -> Property (HasInfo + Debian))
    -> DebianSuite
    -> Architecture
    -> DebootstrapConfig
    -> Flavor
    -> Times
    -> String
    -> Container
    autoBuilderContainer DebianSuite
    -> Architecture -> Flavor -> Property (HasInfo + Debian)
    mkprop DebianSuite
    suite Architecture
    arch DebootstrapConfig
    debootstrapconfig Flavor
    flavor Times
    crontime String
    timeout =
    	String -> (String -> Chroot) -> Container
    Systemd.container String
    name ((String -> Chroot) -> Container)
    -> (String -> Chroot) -> Container
    forall a b. (a -> b) -> a -> b
    $ \String
    d -> DebootstrapConfig
    -> String
    -> Props
         (MetaTypes
            (Combine
               (Combine
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                  '[ 'WithInfo, 'Targeting 'OSDebian])
               '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    -> Chroot
    forall metatypes.
    DebootstrapConfig -> String -> Props metatypes -> Chroot
    Chroot.debootstrapped DebootstrapConfig
    debootstrapconfig String
    d (Props
       (MetaTypes
          (Combine
             (Combine
                '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                   'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                '[ 'WithInfo, 'Targeting 'OSDebian])
             '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
     -> Chroot)
    -> Props
         (MetaTypes
            (Combine
               (Combine
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                  '[ 'WithInfo, 'Targeting 'OSDebian])
               '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    -> Chroot
    forall a b. (a -> b) -> a -> b
    $ Props UnixLike
    props
    		Props UnixLike
    -> Property (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
    -> Props
         (Sing
            (Combine
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
               '[ 'WithInfo, 'Targeting 'OSDebian]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & DebianSuite
    -> Architecture -> Flavor -> Property (HasInfo + Debian)
    mkprop DebianSuite
    suite Architecture
    arch Flavor
    flavor
    		Props
      (Sing
         (Combine
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
            '[ 'WithInfo, 'Targeting 'OSDebian]))
    -> Property
         (MetaTypes
            '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
    -> Props
         (MetaTypes
            (Combine
               (Combine
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                  '[ 'WithInfo, 'Targeting 'OSDebian])
               '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & String -> Times -> String -> Property (HasInfo + DebianLike)
    autobuilder (Architecture -> String
    architectureToDebianArchString Architecture
    arch) Times
    crontime String
    timeout
      where
    	name :: String
    name = Architecture -> String
    architectureToDebianArchString Architecture
    arch String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String -> Flavor -> String
    forall a. a -> Maybe a -> a
    fromMaybe String
    "" Flavor
    flavor String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ String
    "-git-annex-builder"

    type Flavor = Maybe String

    standardAutoBuilder :: Bool -> DebianSuite -> Architecture -> Flavor -> Property (HasInfo + Debian)
    standardAutoBuilder :: Bool
    -> DebianSuite
    -> Architecture
    -> Flavor
    -> Property (HasInfo + Debian)
    standardAutoBuilder Bool
    unattendedupgrades DebianSuite
    suite Architecture
    arch Flavor
    flavor =
    	String
    -> Props (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
    -> Property (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
    forall {k} (metatypes :: k).
    SingI metatypes =>
    String
    -> Props (MetaTypes metatypes) -> Property (MetaTypes metatypes)
    propertyList String
    "standard git-annex autobuilder" (Props (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
     -> Property (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian]))
    -> Props (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
    -> Property (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
    forall a b. (a -> b) -> a -> b
    $ Props UnixLike
    props
    		Props UnixLike
    -> Property (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
    -> Props
         (Sing
            (Combine
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
               '[ 'WithInfo, 'Targeting 'OSDebian]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & DebianSuite -> Architecture -> Property (HasInfo + Debian)
    osDebian DebianSuite
    suite Architecture
    arch
    		Props
      (Sing
         (Combine
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
            '[ 'WithInfo, 'Targeting 'OSDebian]))
    -> Property Debian
    -> Props
         (Sing
            (Combine
               (Combine
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                  '[ 'WithInfo, 'Targeting 'OSDebian])
               '[ 'Targeting 'OSDebian]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & Property Debian
    Apt.stdSourcesList
    		Props
      (Sing
         (Combine
            (Combine
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
               '[ 'WithInfo, 'Targeting 'OSDebian])
            '[ 'Targeting 'OSDebian]))
    -> Property DebianLike
    -> Props
         (Sing
            (Combine
               (Combine
                  (Combine
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                     '[ 'WithInfo, 'Targeting 'OSDebian])
                  '[ 'Targeting 'OSDebian])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & Property DebianLike
    Apt.cacheCleaned
    		Props
      (Sing
         (Combine
            (Combine
               (Combine
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                  '[ 'WithInfo, 'Targeting 'OSDebian])
               '[ 'Targeting 'OSDebian])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    -> RevertableProperty DebianLike DebianLike
    -> Props
         (Sing
            (Combine
               (Combine
                  (Combine
                     (Combine
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                        '[ 'WithInfo, 'Targeting 'OSDebian])
                     '[ 'Targeting 'OSDebian])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & (if Bool
    unattendedupgrades then RevertableProperty DebianLike DebianLike
    Apt.unattendedUpgrades else RevertableProperty DebianLike DebianLike
    forall a. Monoid a => a
    mempty)
    		Props
      (Sing
         (Combine
            (Combine
               (Combine
                  (Combine
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                     '[ 'WithInfo, 'Targeting 'OSDebian])
                  '[ 'Targeting 'OSDebian])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    -> Property DebianLike
    -> Props
         (Sing
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                           '[ 'WithInfo, 'Targeting 'OSDebian])
                        '[ 'Targeting 'OSDebian])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & User -> Property DebianLike
    User.accountFor (String -> User
    User String
    builduser)
    		Props
      (Sing
         (Combine
            (Combine
               (Combine
                  (Combine
                     (Combine
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                        '[ 'WithInfo, 'Targeting 'OSDebian])
                     '[ 'Targeting 'OSDebian])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    -> Property DebianLike
    -> Props
         (Sing
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                 'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                              '[ 'WithInfo, 'Targeting 'OSDebian])
                           '[ 'Targeting 'OSDebian])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & String -> Flavor -> Property DebianLike
    tree (Architecture -> String
    architectureToDebianArchString Architecture
    arch) Flavor
    flavor
    		Props
      (Sing
         (Combine
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                           '[ 'WithInfo, 'Targeting 'OSDebian])
                        '[ 'Targeting 'OSDebian])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    -> Property DebianLike
    -> Props
         (MetaTypes
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              (Combine
                                 '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                    'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                                 '[ 'WithInfo, 'Targeting 'OSDebian])
                              '[ 'Targeting 'OSDebian])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & Property DebianLike
    buildDepsApt

    stackAutoBuilder :: DebianSuite -> Architecture -> Flavor -> Property (HasInfo + Debian)
    stackAutoBuilder :: DebianSuite
    -> Architecture -> Flavor -> Property (HasInfo + Debian)
    stackAutoBuilder DebianSuite
    suite Architecture
    arch Flavor
    flavor =
    	String
    -> Props (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
    -> Property (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
    forall {k} (metatypes :: k).
    SingI metatypes =>
    String
    -> Props (MetaTypes metatypes) -> Property (MetaTypes metatypes)
    propertyList String
    "git-annex autobuilder using stack" (Props (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
     -> Property (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian]))
    -> Props (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
    -> Property (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
    forall a b. (a -> b) -> a -> b
    $ Props UnixLike
    props
    		Props UnixLike
    -> Property (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
    -> Props
         (Sing
            (Combine
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
               '[ 'WithInfo, 'Targeting 'OSDebian]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & DebianSuite -> Architecture -> Property (HasInfo + Debian)
    osDebian DebianSuite
    suite Architecture
    arch
    		Props
      (Sing
         (Combine
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
            '[ 'WithInfo, 'Targeting 'OSDebian]))
    -> Property DebianLike
    -> Props
         (Sing
            (Combine
               (Combine
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                  '[ 'WithInfo, 'Targeting 'OSDebian])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & Property DebianLike
    buildDepsNoHaskellLibs
    		-- For some reason security.debian.org is very slow for
    		-- ancient versions of debian stable used with this. So
    		-- disable for now.
    		-- & Apt.stdSourcesList
    		Props
      (Sing
         (Combine
            (Combine
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
               '[ 'WithInfo, 'Targeting 'OSDebian])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    -> RevertableProperty DebianLike DebianLike
    -> Props
         (Sing
            (Combine
               (Combine
                  (Combine
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                     '[ 'WithInfo, 'Targeting 'OSDebian])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & RevertableProperty DebianLike DebianLike
    Apt.unattendedUpgrades
    		Props
      (Sing
         (Combine
            (Combine
               (Combine
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                  '[ 'WithInfo, 'Targeting 'OSDebian])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    -> Property DebianLike
    -> Props
         (Sing
            (Combine
               (Combine
                  (Combine
                     (Combine
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                        '[ 'WithInfo, 'Targeting 'OSDebian])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & Property DebianLike
    Apt.cacheCleaned
    		Props
      (Sing
         (Combine
            (Combine
               (Combine
                  (Combine
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                     '[ 'WithInfo, 'Targeting 'OSDebian])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    -> Property DebianLike
    -> Props
         (Sing
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                           '[ 'WithInfo, 'Targeting 'OSDebian])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & User -> Property DebianLike
    User.accountFor (String -> User
    User String
    builduser)
    		Props
      (Sing
         (Combine
            (Combine
               (Combine
                  (Combine
                     (Combine
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                        '[ 'WithInfo, 'Targeting 'OSDebian])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    -> Property DebianLike
    -> Props
         (Sing
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                 'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                              '[ 'WithInfo, 'Targeting 'OSDebian])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & String -> Flavor -> Property DebianLike
    tree (Architecture -> String
    architectureToDebianArchString Architecture
    arch) Flavor
    flavor
    		Props
      (Sing
         (Combine
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                           '[ 'WithInfo, 'Targeting 'OSDebian])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    -> Property DebianLike
    -> Props
         (Sing
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              (Combine
                                 '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                    'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                                 '[ 'WithInfo, 'Targeting 'OSDebian])
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & Property DebianLike
    stackInstalled
    		-- Workaround https://github.com/commercialhaskell/stack/issues/2093
    		Props
      (Sing
         (Combine
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                 'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                              '[ 'WithInfo, 'Targeting 'OSDebian])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    -> Property DebianLike
    -> Props
         (Sing
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              (Combine
                                 (Combine
                                    '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                       'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                                    '[ 'WithInfo, 'Targeting 'OSDebian])
                                 '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & [String] -> Property DebianLike
    Apt.installed [String
    "libtinfo-dev"]
    		Props
      (Sing
         (Combine
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              (Combine
                                 '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                    'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                                 '[ 'WithInfo, 'Targeting 'OSDebian])
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    -> Property DebianLike
    -> Props
         (MetaTypes
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              (Combine
                                 (Combine
                                    (Combine
                                       '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                          'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                                       '[ 'WithInfo, 'Targeting 'OSDebian])
                                    '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                                 '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & [String] -> Property DebianLike
    Apt.installed [String
    "libnuma1", String
    "libnuma-dev", String
    "zlib1g-dev"]

    stackInstalled :: Property DebianLike
    stackInstalled :: Property DebianLike
    stackInstalled = String
    -> (OuterMetaTypesWitness
          '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
        -> Maybe System -> Propellor Result)
    -> Property DebianLike
    forall {k} (metatypes :: k).
    SingI metatypes =>
    String
    -> (OuterMetaTypesWitness metatypes
        -> Maybe System -> Propellor Result)
    -> Property (MetaTypes metatypes)
    withOS String
    "stack installed" ((OuterMetaTypesWitness
        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
      -> Maybe System -> Propellor Result)
     -> Property DebianLike)
    -> (OuterMetaTypesWitness
          '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
        -> Maybe System -> Propellor Result)
    -> Property DebianLike
    forall a b. (a -> b) -> a -> b
    $ \OuterMetaTypesWitness
      '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
    w Maybe System
    o ->
    	case Maybe System
    o of
    		(Just (System (Debian DebianKernel
    Linux (Stable String
    "jessie")) Architecture
    arch)) ->
    			OuterMetaTypesWitness
      '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
    -> Property DebianLike -> Propellor Result
    forall (inner :: [MetaType]) (outer :: [MetaType]).
    EnsurePropertyAllowed inner outer =>
    OuterMetaTypesWitness outer
    -> Property (MetaTypes inner) -> Propellor Result
    ensureProperty OuterMetaTypesWitness
      '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
    w (Property DebianLike -> Propellor Result)
    -> Property DebianLike -> Propellor Result
    forall a b. (a -> b) -> a -> b
    $ Architecture -> Property DebianLike
    manualinstall Architecture
    arch
    		(Just (System (Debian DebianKernel
    Linux (Stable String
    "stretch")) Architecture
    arch)) ->
    			OuterMetaTypesWitness
      '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
    -> Property DebianLike -> Propellor Result
    forall (inner :: [MetaType]) (outer :: [MetaType]).
    EnsurePropertyAllowed inner outer =>
    OuterMetaTypesWitness outer
    -> Property (MetaTypes inner) -> Propellor Result
    ensureProperty OuterMetaTypesWitness
      '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
    w (Property DebianLike -> Propellor Result)
    -> Property DebianLike -> Propellor Result
    forall a b. (a -> b) -> a -> b
    $ Architecture -> Property DebianLike
    manualinstall Architecture
    arch
    		(Just (System (Debian DebianKernel
    Linux (Stable String
    "buster")) Architecture
    arch)) ->
    			OuterMetaTypesWitness
      '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
    -> Property DebianLike -> Propellor Result
    forall (inner :: [MetaType]) (outer :: [MetaType]).
    EnsurePropertyAllowed inner outer =>
    OuterMetaTypesWitness outer
    -> Property (MetaTypes inner) -> Propellor Result
    ensureProperty OuterMetaTypesWitness
      '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
    w (Property DebianLike -> Propellor Result)
    -> Property DebianLike -> Propellor Result
    forall a b. (a -> b) -> a -> b
    $ Architecture -> Property DebianLike
    manualinstall Architecture
    arch
    		Maybe System
    _ -> OuterMetaTypesWitness
      '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
    -> Property DebianLike -> Propellor Result
    forall (inner :: [MetaType]) (outer :: [MetaType]).
    EnsurePropertyAllowed inner outer =>
    OuterMetaTypesWitness outer
    -> Property (MetaTypes inner) -> Propellor Result
    ensureProperty OuterMetaTypesWitness
      '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
    w (Property DebianLike -> Propellor Result)
    -> Property DebianLike -> Propellor Result
    forall a b. (a -> b) -> a -> b
    $ [String] -> Property DebianLike
    Apt.installed [String
    "haskell-stack"]
      where
    	-- Warning: Using a binary downloaded w/o validation.
    	manualinstall :: Architecture -> Property DebianLike
    	manualinstall :: Architecture -> Property DebianLike
    manualinstall Architecture
    arch = Property
      (MetaTypes
         (Combine
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> Property DebianLike
    forall (untightened :: [MetaType]) (tightened :: [MetaType]).
    (TightenTargetsAllowed untightened tightened, SingI tightened) =>
    Property (MetaTypes untightened) -> Property (MetaTypes tightened)
    forall (p :: * -> *) (untightened :: [MetaType])
           (tightened :: [MetaType]).
    (TightenTargets p, TightenTargetsAllowed untightened tightened,
     SingI tightened) =>
    p (MetaTypes untightened) -> p (MetaTypes tightened)
    tightenTargets (Property
       (MetaTypes
          (Combine
             (Combine
                (Combine
                   (Combine
                      (Combine
                         (Combine
                            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                         '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                            'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                      '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                         'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                   '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                      'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                   'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
             '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
     -> Property DebianLike)
    -> Property
         (MetaTypes
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                 'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> Property DebianLike
    forall a b. (a -> b) -> a -> b
    $ IO Bool
    -> Property
         (MetaTypes
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                 'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> Property
         (MetaTypes
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                 'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall (p :: * -> *) i (m :: * -> *).
    (Checkable p i, LiftPropellor m) =>
    m Bool -> p i -> Property i
    check (Bool -> Bool
    not (Bool -> Bool) -> IO Bool -> IO Bool
    forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
    <$> String -> IO Bool
    doesFileExist String
    binstack) (Property
       (MetaTypes
          (Combine
             (Combine
                (Combine
                   (Combine
                      (Combine
                         (Combine
                            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                         '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                            'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                      '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                         'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                   '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                      'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                   'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
             '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
     -> Property
          (MetaTypes
             (Combine
                (Combine
                   (Combine
                      (Combine
                         (Combine
                            (Combine
                               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                         '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                            'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                      '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                         'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                   '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                      'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                   'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])))
    -> Property
         (MetaTypes
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                 'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> Property
         (MetaTypes
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                 'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall a b. (a -> b) -> a -> b
    $
    		String
    -> Props
         (MetaTypes
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                 'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> Property
         (MetaTypes
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                 'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall {k} (metatypes :: k).
    SingI metatypes =>
    String
    -> Props (MetaTypes metatypes) -> Property (MetaTypes metatypes)
    propertyList String
    "stack installed from upstream tarball" (Props
       (MetaTypes
          (Combine
             (Combine
                (Combine
                   (Combine
                      (Combine
                         (Combine
                            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                         '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                            'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                      '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                         'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                   '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                      'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                   'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
             '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
     -> Property
          (MetaTypes
             (Combine
                (Combine
                   (Combine
                      (Combine
                         (Combine
                            (Combine
                               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                         '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                            'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                      '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                         'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                   '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                      'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                   'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])))
    -> Props
         (MetaTypes
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                 'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> Property
         (MetaTypes
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                 'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall a b. (a -> b) -> a -> b
    $ Props UnixLike
    props
    			Props UnixLike
    -> Property DebianLike
    -> Props
         (MetaTypes
            (Combine
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & [String] -> Property DebianLike
    Apt.installed [String
    "wget"]
    			Props DebianLike
    -> Property UnixLike
    -> Props
         (Sing
            (Combine
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & String -> [String] -> UncheckedProperty UnixLike
    cmdProperty String
    "wget" [String
    url, String
    "-O", String
    tmptar]
    				UncheckedProperty UnixLike -> Result -> Property UnixLike
    forall (p :: * -> *) i.
    Checkable p i =>
    p i -> Result -> Property i
    `assume` Result
    MadeChange
    			Props
      (Sing
         (Combine
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> Property UnixLike
    -> Props
         (Sing
            (Combine
               (Combine
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & String -> Property UnixLike
    File.dirExists String
    tmpdir
    			Props
      (Sing
         (Combine
            (Combine
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> Property UnixLike
    -> Props
         (Sing
            (Combine
               (Combine
                  (Combine
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & String -> [String] -> UncheckedProperty UnixLike
    cmdProperty String
    "tar" [String
    "xf", String
    tmptar, String
    "-C", String
    tmpdir, String
    "--strip-components=1"]
    				UncheckedProperty UnixLike -> Result -> Property UnixLike
    forall (p :: * -> *) i.
    Checkable p i =>
    p i -> Result -> Property i
    `assume` Result
    MadeChange
    			Props
      (Sing
         (Combine
            (Combine
               (Combine
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> Property UnixLike
    -> Props
         (MetaTypes
            (Combine
               (Combine
                  (Combine
                     (Combine
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & String -> [String] -> UncheckedProperty UnixLike
    cmdProperty String
    "mv" [String
    tmpdir String -> String -> String
    </> String
    "stack", String
    binstack]
    				UncheckedProperty UnixLike -> Result -> Property UnixLike
    forall (p :: * -> *) i.
    Checkable p i =>
    p i -> Result -> Property i
    `assume` Result
    MadeChange
    			Props
      (MetaTypes
         (Combine
            (Combine
               (Combine
                  (Combine
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> Property UnixLike
    -> Props
         (Sing
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & String -> [String] -> UncheckedProperty UnixLike
    cmdProperty String
    "rm" [String
    "-rf", String
    tmpdir, String
    tmptar]
    				UncheckedProperty UnixLike -> Result -> Property UnixLike
    forall (p :: * -> *) i.
    Checkable p i =>
    p i -> Result -> Property i
    `assume` Result
    MadeChange
    			Props
      (Sing
         (Combine
            (Combine
               (Combine
                  (Combine
                     (Combine
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> Property UnixLike
    -> Props
         (MetaTypes
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish]
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                 'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & case Architecture
    arch of
    				Architecture
    ARMEL -> RevertableProperty UnixLike UnixLike -> Property UnixLike
    forall setupmetatypes undometatypes.
    RevertableProperty setupmetatypes undometatypes
    -> Property setupmetatypes
    setupRevertableProperty (RevertableProperty UnixLike UnixLike -> Property UnixLike)
    -> RevertableProperty UnixLike UnixLike -> Property UnixLike
    forall a b. (a -> b) -> a -> b
    $
    					String
    "/lib/ld-linux-armhf.so.3"
    					String -> LinkTarget -> RevertableProperty UnixLike UnixLike
    `File.isSymlinkedTo`
    					String -> LinkTarget
    File.LinkTarget String
    "/lib/ld-linux.so.3"
    				Architecture
    _ -> Property UnixLike
    forall {k} (t :: k). SingI t => Property (MetaTypes t)
    doNothing
    	  where
    		url :: String
    url = case Architecture
    arch of
    			Architecture
    X86_64 -> String
    "https://github.com/commercialhaskell/stack/releases/download/v1.9.3/stack-1.9.3-linux-x86_64.tar.gz"
    			Architecture
    X86_32 -> String
    "https://github.com/commercialhaskell/stack/releases/download/v1.9.3/stack-1.9.3-linux-i386.tar.gz"
    			Architecture
    ARMEL -> String
    "https://github.com/commercialhaskell/stack/releases/download/v1.9.3/stack-1.9.3-linux-arm.tar.gz"
    			-- Newer version because older version did not
    			-- support installing ghc on arm64
    			Architecture
    ARM64 -> String
    "https://github.com/commercialhaskell/stack/releases/download/v2.1.3/stack-2.1.3-linux-aarch64.tar.gz"
    			-- Probably not available.
    			Architecture
    a -> String
    "https://www.stackage.org/stack/linux-" String -> String -> String
    forall a. [a] -> [a] -> [a]
    ++ Architecture -> String
    architectureToDebianArchString Architecture
    a
    	binstack :: String
    binstack = String
    "/usr/bin/stack"
    	tmptar :: String
    tmptar = String
    "/root/stack.tar.gz"
    	tmpdir :: String
    tmpdir = String
    "/root/stack"

    armAutoBuilder :: (DebianSuite -> Architecture -> Flavor -> Property (HasInfo + Debian)) -> DebianSuite -> Architecture -> Flavor -> Property (HasInfo + Debian)
    armAutoBuilder :: (DebianSuite
     -> Architecture -> Flavor -> Property (HasInfo + Debian))
    -> DebianSuite
    -> Architecture
    -> Flavor
    -> Property (HasInfo + Debian)
    armAutoBuilder DebianSuite
    -> Architecture -> Flavor -> Property (HasInfo + Debian)
    baseautobuilder DebianSuite
    suite Architecture
    arch Flavor
    flavor =
    	String
    -> Props (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
    -> Property (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
    forall {k} (metatypes :: k).
    SingI metatypes =>
    String
    -> Props (MetaTypes metatypes) -> Property (MetaTypes metatypes)
    propertyList String
    "arm git-annex autobuilder" (Props (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
     -> Property (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian]))
    -> Props (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
    -> Property (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
    forall a b. (a -> b) -> a -> b
    $ Props UnixLike
    props
    		Props UnixLike
    -> Property (MetaTypes '[ 'WithInfo, 'Targeting 'OSDebian])
    -> Props
         (Sing
            (Combine
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
               '[ 'WithInfo, 'Targeting 'OSDebian]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & DebianSuite
    -> Architecture -> Flavor -> Property (HasInfo + Debian)
    baseautobuilder DebianSuite
    suite Architecture
    arch Flavor
    flavor
    		-- Works around ghc crash with parallel builds on arm.
    		Props
      (Sing
         (Combine
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
            '[ 'WithInfo, 'Targeting 'OSDebian]))
    -> Property UnixLike
    -> Props
         (Sing
            (Combine
               (Combine
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                  '[ 'WithInfo, 'Targeting 'OSDebian])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & String -> Property UnixLike
    File.dirExists (String
    homedir String -> String -> String
    </> String
    ".cabal")
    		Props
      (Sing
         (Combine
            (Combine
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
               '[ 'WithInfo, 'Targeting 'OSDebian])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> Property UnixLike
    -> Props
         (Sing
            (Combine
               (Combine
                  (Combine
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                     '[ 'WithInfo, 'Targeting 'OSDebian])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & String -> User -> Group -> Property UnixLike
    File.ownerGroup (String
    homedir String -> String -> String
    </> String
    ".cabal") (String -> User
    User String
    "builder") (String -> Group
    Group String
    "builder")
    		Props
      (Sing
         (Combine
            (Combine
               (Combine
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                  '[ 'WithInfo, 'Targeting 'OSDebian])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> Property UnixLike
    -> Props
         (Sing
            (Combine
               (Combine
                  (Combine
                     (Combine
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                        '[ 'WithInfo, 'Targeting 'OSDebian])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & (String
    homedir String -> String -> String
    </> String
    ".cabal" String -> String -> String
    </> String
    "config")
    			String -> String -> Property UnixLike
    `File.containsLine` String
    "jobs: 1"
    		Props
      (Sing
         (Combine
            (Combine
               (Combine
                  (Combine
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                     '[ 'WithInfo, 'Targeting 'OSDebian])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> Property UnixLike
    -> Props
         (Sing
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                           '[ 'WithInfo, 'Targeting 'OSDebian])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & String -> User -> Group -> Property UnixLike
    File.ownerGroup (String
    homedir String -> String -> String
    </> String
    ".cabal" String -> String -> String
    </> String
    "config") (String -> User
    User String
    "builder") (String -> Group
    Group String
    "builder")
    		-- Work around https://github.com/systemd/systemd/issues/7135
    		Props
      (Sing
         (Combine
            (Combine
               (Combine
                  (Combine
                     (Combine
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                        '[ 'WithInfo, 'Targeting 'OSDebian])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
            '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]))
    -> RevertableProperty
         (MetaTypes
            '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux])
         (MetaTypes
            '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
               'Targeting 'OSArchLinux])
    -> Props
         (MetaTypes
            (Combine
               (Combine
                  (Combine
                     (Combine
                        (Combine
                           (Combine
                              '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                                 'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD]
                              '[ 'WithInfo, 'Targeting 'OSDebian])
                           '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                              'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                        '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                           'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                     '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                        'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
                  '[ 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                     'Targeting 'OSArchLinux, 'Targeting 'OSFreeBSD])
               '[ 'WithInfo, 'Targeting 'OSDebian, 'Targeting 'OSBuntish,
                  'Targeting 'OSArchLinux]))
    forall {a} p (y :: [a]) (x :: [a]).
    (IsProp p, MetaTypes y ~ GetMetaTypes p,
     CheckCombinableNote x y (NoteFor ('Text "&"))) =>
    Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
    & String -> RevertableProperty (HasInfo + Linux) (HasInfo + Linux)
    Systemd.containerCfg String
    "--system-call-filter=set_tls"