diff --git a/.gitignore b/.gitignore index d724137c..fe358fd0 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ dist client_session_key.aes cabal-dev/ yesod/foobar/ +yesod-platform/yesod-platform.cabal diff --git a/yesod-platform/LICENSE b/yesod-platform/LICENSE new file mode 100644 index 00000000..8643e5d8 --- /dev/null +++ b/yesod-platform/LICENSE @@ -0,0 +1,25 @@ +The following license covers this documentation, and the source code, except +where otherwise indicated. + +Copyright 2010, Michael Snoyman. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/yesod-platform/Setup.lhs b/yesod-platform/Setup.lhs new file mode 100755 index 00000000..06e2708f --- /dev/null +++ b/yesod-platform/Setup.lhs @@ -0,0 +1,7 @@ +#!/usr/bin/env runhaskell + +> module Main where +> import Distribution.Simple + +> main :: IO () +> main = defaultMain diff --git a/yesod-platform/Yesod/Platform.hs b/yesod-platform/Yesod/Platform.hs new file mode 100644 index 00000000..5d8a533d --- /dev/null +++ b/yesod-platform/Yesod/Platform.hs @@ -0,0 +1,7 @@ +-- | This module contains nothing import, it just re-exports @Yesod@. It is +-- provided simply to make this a complete package. +module Yesod.Platform + ( module Yesod + ) where + +import Yesod diff --git a/yesod-platform/make-cabal.sh b/yesod-platform/make-cabal.sh new file mode 100755 index 00000000..e169d6e4 --- /dev/null +++ b/yesod-platform/make-cabal.sh @@ -0,0 +1,10 @@ +#!/bin/bash -e + +#cabal update + +if ! which cabal-nirvana-generate &>/dev/null +then + cabal install cabal-nirvana -fgenerate +fi + +cabal-nirvana-generate yesod | runghc to-cabal.hs > yesod-platform.cabal diff --git a/yesod-platform/to-cabal.hs b/yesod-platform/to-cabal.hs new file mode 100644 index 00000000..06997a45 --- /dev/null +++ b/yesod-platform/to-cabal.hs @@ -0,0 +1,35 @@ +import Data.List (intercalate, isPrefixOf) +import Control.Applicative ((<$>)) + +main = do + pkgs <- map (intercalate " == ") + . filter (\xs -> not $ ["parsec"] `isPrefixOf` xs) + . map words + . filter (not . null) + . lines + <$> getContents + putStrLn "name: yesod-platform" + putStrLn "version: FIXME" + putStrLn "license: BSD3" + putStrLn "license-file: LICENSE" + putStrLn "author: Michael Snoyman " + putStrLn "maintainer: Michael Snoyman " + putStrLn "synopsis: Meta package for Yesod" + putStrLn "description: Instead of allowing version ranges of dependencies, this package requires specific versions to avoid dependency hell" + putStrLn "category: Web, Yesod" + putStrLn "stability: Stable" + putStrLn "cabal-version: >= 1.6" + putStrLn "build-type: Simple" + putStrLn "homepage: http://www.yesodweb.com/" + putStrLn "" + putStrLn "library" + putStrLn " build-depends: base >= 4 && < 5" + mapM_ go pkgs + putStrLn "" + putStrLn " exposed-modules: Yesod.Platform" + putStrLn "" + putStrLn "source-repository head" + putStrLn " type: git" + putStrLn " location: https://github.com/yesodweb/yesod" + +go s = putStrLn $ concat [" , ", s]