├── .github └── workflows │ └── haskell-ci.yml ├── .gitignore ├── CHANGELOG.md ├── README.md ├── Text └── RSS.hs ├── cabal.haskell-ci ├── default.nix ├── examples └── whiskers.hs ├── rss.cabal └── rss.nix /.github/workflows/haskell-ci.yml: -------------------------------------------------------------------------------- 1 | # This GitHub workflow config has been generated by a script via 2 | # 3 | # haskell-ci 'github' 'rss.cabal' 4 | # 5 | # To regenerate the script (for example after adjusting tested-with) run 6 | # 7 | # haskell-ci regenerate 8 | # 9 | # For more information, see https://github.com/haskell-CI/haskell-ci 10 | # 11 | # version: 0.19.20250506 12 | # 13 | # REGENDATA ("0.19.20250506",["github","rss.cabal"]) 14 | # 15 | name: Haskell-CI 16 | on: 17 | push: 18 | branches: 19 | - master 20 | pull_request: 21 | branches: 22 | - master 23 | jobs: 24 | linux: 25 | name: Haskell-CI - Linux - ${{ matrix.compiler }} 26 | runs-on: ubuntu-24.04 27 | timeout-minutes: 28 | 60 29 | container: 30 | image: buildpack-deps:jammy 31 | continue-on-error: ${{ matrix.allow-failure }} 32 | strategy: 33 | matrix: 34 | include: 35 | - compiler: ghc-9.12.2 36 | compilerKind: ghc 37 | compilerVersion: 9.12.2 38 | setup-method: ghcup 39 | allow-failure: false 40 | - compiler: ghc-9.10.2 41 | compilerKind: ghc 42 | compilerVersion: 9.10.2 43 | setup-method: ghcup 44 | allow-failure: false 45 | - compiler: ghc-9.8.4 46 | compilerKind: ghc 47 | compilerVersion: 9.8.4 48 | setup-method: ghcup 49 | allow-failure: false 50 | - compiler: ghc-9.6.7 51 | compilerKind: ghc 52 | compilerVersion: 9.6.7 53 | setup-method: ghcup 54 | allow-failure: false 55 | - compiler: ghc-9.4.8 56 | compilerKind: ghc 57 | compilerVersion: 9.4.8 58 | setup-method: ghcup 59 | allow-failure: false 60 | - compiler: ghc-9.2.8 61 | compilerKind: ghc 62 | compilerVersion: 9.2.8 63 | setup-method: ghcup 64 | allow-failure: false 65 | - compiler: ghc-9.0.2 66 | compilerKind: ghc 67 | compilerVersion: 9.0.2 68 | setup-method: ghcup 69 | allow-failure: false 70 | - compiler: ghc-8.10.7 71 | compilerKind: ghc 72 | compilerVersion: 8.10.7 73 | setup-method: ghcup 74 | allow-failure: false 75 | - compiler: ghc-8.8.4 76 | compilerKind: ghc 77 | compilerVersion: 8.8.4 78 | setup-method: ghcup 79 | allow-failure: false 80 | - compiler: ghc-8.6.5 81 | compilerKind: ghc 82 | compilerVersion: 8.6.5 83 | setup-method: ghcup 84 | allow-failure: false 85 | - compiler: ghc-8.4.4 86 | compilerKind: ghc 87 | compilerVersion: 8.4.4 88 | setup-method: ghcup 89 | allow-failure: false 90 | - compiler: ghc-8.2.2 91 | compilerKind: ghc 92 | compilerVersion: 8.2.2 93 | setup-method: ghcup 94 | allow-failure: false 95 | - compiler: ghc-8.0.2 96 | compilerKind: ghc 97 | compilerVersion: 8.0.2 98 | setup-method: ghcup 99 | allow-failure: false 100 | fail-fast: false 101 | steps: 102 | - name: apt-get install 103 | run: | 104 | apt-get update 105 | apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 libnuma-dev 106 | - name: Install GHCup 107 | run: | 108 | mkdir -p "$HOME/.ghcup/bin" 109 | curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup" 110 | chmod a+x "$HOME/.ghcup/bin/ghcup" 111 | - name: Install cabal-install 112 | run: | 113 | "$HOME/.ghcup/bin/ghcup" install cabal 3.14.2.0 || (cat "$HOME"/.ghcup/logs/*.* && false) 114 | echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.2.0 -vnormal+nowrap" >> "$GITHUB_ENV" 115 | - name: Install GHC (GHCup) 116 | if: matrix.setup-method == 'ghcup' 117 | run: | 118 | "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) 119 | HC=$("$HOME/.ghcup/bin/ghcup" whereis ghc "$HCVER") 120 | HCPKG=$(echo "$HC" | sed 's#ghc$#ghc-pkg#') 121 | HADDOCK=$(echo "$HC" | sed 's#ghc$#haddock#') 122 | echo "HC=$HC" >> "$GITHUB_ENV" 123 | echo "HCPKG=$HCPKG" >> "$GITHUB_ENV" 124 | echo "HADDOCK=$HADDOCK" >> "$GITHUB_ENV" 125 | env: 126 | HCKIND: ${{ matrix.compilerKind }} 127 | HCNAME: ${{ matrix.compiler }} 128 | HCVER: ${{ matrix.compilerVersion }} 129 | - name: Set PATH and environment variables 130 | run: | 131 | echo "$HOME/.cabal/bin" >> $GITHUB_PATH 132 | echo "LANG=C.UTF-8" >> "$GITHUB_ENV" 133 | echo "CABAL_DIR=$HOME/.cabal" >> "$GITHUB_ENV" 134 | echo "CABAL_CONFIG=$HOME/.cabal/config" >> "$GITHUB_ENV" 135 | HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') 136 | echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV" 137 | echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV" 138 | echo "ARG_BENCH=--enable-benchmarks" >> "$GITHUB_ENV" 139 | echo "HEADHACKAGE=false" >> "$GITHUB_ENV" 140 | echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV" 141 | env: 142 | HCKIND: ${{ matrix.compilerKind }} 143 | HCNAME: ${{ matrix.compiler }} 144 | HCVER: ${{ matrix.compilerVersion }} 145 | - name: env 146 | run: | 147 | env 148 | - name: write cabal config 149 | run: | 150 | mkdir -p $CABAL_DIR 151 | cat >> $CABAL_CONFIG <> $CABAL_CONFIG < cabal-plan.xz 184 | echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c - 185 | xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan 186 | rm -f cabal-plan.xz 187 | chmod a+x $HOME/.cabal/bin/cabal-plan 188 | cabal-plan --version 189 | - name: checkout 190 | uses: actions/checkout@v4 191 | with: 192 | path: source 193 | - name: initial cabal.project for sdist 194 | run: | 195 | touch cabal.project 196 | echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project 197 | cat cabal.project 198 | - name: sdist 199 | run: | 200 | mkdir -p sdist 201 | $CABAL sdist all --output-dir $GITHUB_WORKSPACE/sdist 202 | - name: unpack 203 | run: | 204 | mkdir -p unpacked 205 | find sdist -maxdepth 1 -type f -name '*.tar.gz' -exec tar -C $GITHUB_WORKSPACE/unpacked -xzvf {} \; 206 | - name: generate cabal.project 207 | run: | 208 | PKGDIR_rss="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/rss-[0-9.]*')" 209 | echo "PKGDIR_rss=${PKGDIR_rss}" >> "$GITHUB_ENV" 210 | rm -f cabal.project cabal.project.local 211 | touch cabal.project 212 | touch cabal.project.local 213 | echo "packages: ${PKGDIR_rss}" >> cabal.project 214 | if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo "package rss" >> cabal.project ; fi 215 | if [ $((HCNUMVER >= 80200)) -ne 0 ] ; then echo " ghc-options: -Werror=missing-methods" >> cabal.project ; fi 216 | cat >> cabal.project <> cabal.project.local 219 | cat cabal.project 220 | cat cabal.project.local 221 | - name: dump install plan 222 | run: | 223 | $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dry-run all 224 | cabal-plan 225 | - name: restore cache 226 | uses: actions/cache/restore@v4 227 | with: 228 | key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} 229 | path: ~/.cabal/store 230 | restore-keys: ${{ runner.os }}-${{ matrix.compiler }}- 231 | - name: install dependencies 232 | run: | 233 | $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all 234 | $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all 235 | - name: build w/o tests 236 | run: | 237 | $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all 238 | - name: build 239 | run: | 240 | $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --write-ghc-environment-files=always 241 | - name: cabal check 242 | run: | 243 | cd ${PKGDIR_rss} || false 244 | ${CABAL} -vnormal check 245 | - name: haddock 246 | run: | 247 | $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all 248 | - name: unconstrained build 249 | run: | 250 | rm -f cabal.project.local 251 | $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all 252 | - name: save cache 253 | if: always() 254 | uses: actions/cache/save@v4 255 | with: 256 | key: ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }} 257 | path: ~/.cabal/store 258 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | dist-newstyle 2 | .ghc.environment.* 3 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 3000.2.0.8 2 | ---------- 3 | 4 | _Andreas Abel, 2024-03-16_ 5 | 6 | * Drop support for GHC 7. 7 | * Remove cabal flag `old-locale`. 8 | * Tested with GHC 8.0 - 9.10. 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A Haskell library for generating RSS 2.0 feeds. 2 | 3 | Note that this library was previously maintained by Bjorn Bringert in a [darcs repository](http://code.haskell.org/rss) before being converted into a Git repository. 4 | -------------------------------------------------------------------------------- /Text/RSS.hs: -------------------------------------------------------------------------------- 1 | ----------------------------------------------------------------------------- 2 | -- | 3 | -- Module : Text.RSS 4 | -- Copyright : Copyright 2004, Jeremy Shaw, http://www.n-heptane.com/ 5 | -- Copyright 2004-2006, Bjorn Bringert (bjorn@bringert.net) 6 | -- License : This code is released to the public domain and comes 7 | -- with no warranty. 8 | -- 9 | -- Maintainer : Andreas Abel 10 | -- Stability : stable 11 | -- Portability : portable 12 | -- 13 | -- A libary for generating RSS 2.0 feeds. 14 | -- 15 | -- 16 | -- Original module by Jeremy Shaw. 17 | -- 18 | -- Changes by Bjorn Bringert: 19 | -- 20 | -- * showXml just converts the RSS to a String, does not print it. 21 | -- 22 | -- * Added XML escaping. 23 | -- 24 | -- * Use RFC 2822 format for dates. 25 | -- 26 | -- * Added all elements from RSS 2.0.1-rv-6, 27 | -- 28 | -- 29 | -- * Use HaXml.Verbatim instead of HaXml.Pretty, since 30 | -- HaXml.Pretty seems to introduce spaces around entities. 31 | -- 32 | -- * Removed the use of content:encoded, since the description 33 | -- tag is the recommented way to include HTML content in RSS 2.0. 34 | -- 35 | -- Changes by Bas van Dijk: 36 | -- 37 | -- * Use @UTCTime@ from @time@ instead of @CalendarTime@ from @old-time@. 38 | -- 39 | -- * Add our own @Weekday@ type instead of using the @Day@ type from @old-time@. 40 | -- 41 | ----------------------------------------------------------------------------- 42 | module Text.RSS (RSS(..), Item, ChannelElem(..), ItemElem(..), 43 | Title,Link,Description,Width,Height, 44 | Email,Domain,MIME_Type,InputName, 45 | Weekday(..), Hour, Minutes, 46 | CloudHost, CloudPort, CloudPath, 47 | CloudProcedure, CloudProtocol(..), 48 | rssToXML, showXML 49 | ) where 50 | 51 | import Data.Ix (Ix) 52 | 53 | import Network.URI (URI) 54 | 55 | import Data.Time.Format (defaultTimeLocale, 56 | rfc822DateFormat) 57 | import Data.Time.Clock (UTCTime) 58 | import Data.Time.Format (formatTime) 59 | 60 | import Text.XML.HaXml.Combinators (CFilter, cdata, literal, mkElem, 61 | mkElemAttr) 62 | import Text.XML.HaXml.Escape (stdXmlEscaper, xmlEscape) 63 | import Text.XML.HaXml.Types (Content (..), Element) 64 | import Text.XML.HaXml.Verbatim (verbatim) 65 | 66 | 67 | data RSS = RSS Title Link Description [ChannelElem] [Item] 68 | deriving Show 69 | 70 | type Item = [ItemElem] 71 | 72 | type Title = String 73 | type Link = URI 74 | type Description = String 75 | type Width = Int 76 | type Height = Int 77 | type Email = String 78 | type Domain = String 79 | type MIME_Type = String 80 | type InputName = String 81 | type Hour = Int 82 | type Minutes = Int 83 | 84 | type CloudHost = String 85 | type CloudPort = Int 86 | type CloudPath = String 87 | type CloudProcedure = String 88 | data CloudProtocol = CloudProtocolXmlRpc | CloudProtocolSOAP 89 | deriving Show 90 | 91 | data ChannelElem = Language String 92 | | Copyright String 93 | | ManagingEditor Email 94 | | WebMaster Email 95 | | ChannelPubDate UTCTime 96 | | LastBuildDate UTCTime 97 | | ChannelCategory (Maybe Domain) String 98 | | Generator String 99 | -- no docs tag, we generate that automatically 100 | | Cloud CloudHost CloudPort CloudPath CloudProcedure CloudProtocol 101 | | TTL Minutes 102 | | Image URI Title Link (Maybe Width) (Maybe Height) (Maybe Description) 103 | | Rating String 104 | | TextInput Title Description InputName Link 105 | | SkipHours [Hour] 106 | | SkipDays [Weekday] 107 | deriving Show 108 | 109 | data ItemElem = Title Title 110 | | Link Link 111 | | Description Description 112 | | Author Email 113 | | Category (Maybe Domain) String 114 | | Comments URI 115 | | Enclosure URI Int MIME_Type 116 | | Guid Bool String 117 | | PubDate UTCTime 118 | | Source URI Title 119 | deriving (Show) 120 | 121 | -- | A day of the week. 122 | data Weekday = Sunday | Monday | Tuesday | Wednesday 123 | | Thursday | Friday | Saturday 124 | deriving (Eq, Ord, Enum, Bounded, Ix, Read, Show) 125 | 126 | -- | Converts RSS to XML. 127 | rssToXML :: RSS -> CFilter () 128 | rssToXML (RSS title link description celems items) = 129 | mkElemAttr "rss" [("version",literal "2.0")] 130 | [mkElem "channel" ([mkTitle title, 131 | mkLink link, 132 | mkDescription description, 133 | mkDocs] 134 | ++ map mkChannelElem celems 135 | ++ map mkItem items)] 136 | 137 | -- | Render XML as a string. 138 | showXML :: CFilter () -> String 139 | showXML = verbatim . cfilterToElem 140 | 141 | cfilterToElem :: CFilter () -> Element () 142 | cfilterToElem f = case f (CString False "" ()) of 143 | [CElem e _] -> xmlEscape stdXmlEscaper e 144 | [] -> error "RSS produced no output" 145 | _ -> error "RSS produced more than one output" 146 | 147 | mkSimple :: String -> String -> CFilter () 148 | mkSimple t str = mkElem t [literal str] 149 | 150 | mkTitle :: Title -> CFilter () 151 | mkTitle = mkSimple "title" 152 | 153 | mkLink :: Link -> CFilter () 154 | mkLink = mkSimple "link" . show 155 | 156 | mkDescription :: Description -> CFilter () 157 | mkDescription str = mkElem "description" [cdata str] 158 | 159 | mkDocs :: CFilter () 160 | mkDocs = mkSimple "docs" "http://www.rssboard.org/rss-specification" 161 | 162 | mkPubDate :: UTCTime -> CFilter () 163 | mkPubDate = mkSimple "pubDate" . formatDate 164 | 165 | formatDate :: UTCTime -> String 166 | formatDate = formatTime defaultTimeLocale rfc822DateFormat 167 | 168 | mkCategory :: Maybe Domain -> String -> CFilter () 169 | mkCategory md s = mkElemAttr "category" attrs [literal s] 170 | where attrs = maybe [] (\d -> [("domain", literal d)]) md 171 | 172 | maybeElem :: (a -> CFilter ()) -> Maybe a -> [CFilter ()] 173 | maybeElem = maybe [] . ((:[]) .) 174 | 175 | mkChannelElem :: ChannelElem -> CFilter () 176 | mkChannelElem (Language str) = mkSimple "language" str 177 | mkChannelElem (Copyright str) = mkSimple "copyright" str 178 | mkChannelElem (ManagingEditor str) = mkSimple "managingEditor" str 179 | mkChannelElem (WebMaster str) = mkSimple "webMaster" str 180 | mkChannelElem (ChannelPubDate date) = mkPubDate date 181 | mkChannelElem (LastBuildDate date) = mkSimple "lastBuildDate" $ formatDate date 182 | mkChannelElem (ChannelCategory md str) = mkCategory md str 183 | mkChannelElem (Generator str) = mkSimple "generator" str 184 | mkChannelElem (Cloud host port path proc proto) 185 | = mkElemAttr "cloud" [("domain", literal host), 186 | ("port", literal (show port)), 187 | ("path", literal path), 188 | ("registerProcedure", literal proc), 189 | ("protocol", literal (protocolName proto))] [] 190 | mkChannelElem (TTL minutes) = mkSimple "ttl" $ show minutes 191 | mkChannelElem (Image uri title link mw mh mdesc) 192 | = mkElem "image" ([mkElem "url" [literal (show uri)], 193 | mkTitle title, mkLink link] 194 | ++ maybeElem (mkSimple "width" . show) mw 195 | ++ maybeElem (mkSimple "height" . show) mh 196 | ++ maybeElem mkDescription mdesc) 197 | mkChannelElem (Rating str) = mkSimple "rating" str 198 | mkChannelElem (TextInput title desc name link) 199 | = mkElem "textInput" [mkTitle title, mkDescription desc, 200 | mkSimple "name" name, mkLink link] 201 | mkChannelElem (SkipHours hs) = mkElem "skipHours" (map (mkSimple "hour" . show) hs) 202 | mkChannelElem (SkipDays ds) = mkElem "skipDays" (map (mkSimple "day" . show) ds) 203 | 204 | protocolName :: CloudProtocol -> String 205 | protocolName CloudProtocolXmlRpc = "xml-rpc" 206 | protocolName CloudProtocolSOAP = "soap" 207 | 208 | mkItem :: Item -> CFilter () 209 | mkItem itemElems = mkElem "item" (map mkItemElem itemElems) 210 | 211 | mkItemElem :: ItemElem -> CFilter () 212 | mkItemElem (Title t) = mkTitle t 213 | mkItemElem (Link l) = mkLink l 214 | mkItemElem (Description d) = mkDescription d 215 | mkItemElem (Author e) = mkElem "author" [literal e] 216 | mkItemElem (Category md str) = mkCategory md str 217 | mkItemElem (Comments uri) = mkSimple "comments" $ show uri 218 | mkItemElem (Enclosure uri len mtype) = 219 | mkElemAttr "enclosure" [("url", literal (show uri)), 220 | ("length", literal (show len)), 221 | ("type", literal (mtype))] 222 | [] 223 | mkItemElem (Guid perm s) = mkElemAttr "guid" attrs [ literal s ] 224 | where attrs = if perm then [("isPermaLink", literal "true")] else [] 225 | mkItemElem (PubDate ct) = mkElem "pubDate" [ literal (formatDate ct) ] 226 | mkItemElem (Source uri t) = 227 | mkElemAttr "source" [("url", literal (show uri))] [ literal t ] 228 | -------------------------------------------------------------------------------- /cabal.haskell-ci: -------------------------------------------------------------------------------- 1 | branches: master 2 | 3 | -- constraint-set time-1.14 4 | -- ghc: >= 9.0 5 | -- constraints: time ==1.14 6 | -------------------------------------------------------------------------------- /default.nix: -------------------------------------------------------------------------------- 1 | { nixpkgs ? import {}, compiler ? "default" }: 2 | 3 | let 4 | 5 | inherit (nixpkgs) pkgs; 6 | 7 | haskellPackages = if compiler == "default" 8 | then pkgs.haskellPackages 9 | else pkgs.haskell.packages.${compiler}; 10 | 11 | drv = haskellPackages.callPackage (import ./rss.nix) {}; 12 | 13 | in 14 | 15 | if pkgs.lib.inNixShell then drv.env else drv 16 | -------------------------------------------------------------------------------- /examples/whiskers.hs: -------------------------------------------------------------------------------- 1 | module Main where 2 | 3 | import Text.RSS 4 | 5 | import Data.Maybe 6 | import Network.URI 7 | import System.IO.Unsafe 8 | import Data.Time.Clock 9 | 10 | main = putStrLn . showXML . rssToXML . rss =<< getCurrentTime 11 | 12 | rss :: UTCTime -> RSS 13 | rss t = RSS "my whiskers" 14 | (fromJust (parseURI "http://www.n-heptane.com")) 15 | "they are very pointy and luxurious" 16 | [] 17 | [[ Title "yea-haw" 18 | , Link (fromJust (parseURI "http://www.n-heptane.com/")) 19 | , Description "the best site ever!!!" 20 | , Author "jeremy@n-heptane.com (Jeremy Shaw)" 21 | , Category Nothing "meow" 22 | , Enclosure (fromJust (parseURI "http://www.n-heptane.com/newpics/alice.gif")) 7333 "image/jpeg" 23 | , Guid True "whee babayyyy!" 24 | , PubDate t 25 | , Source (fromJust (parseURI "http://www.google.com/")) "The best search engine eva!" 26 | ] 27 | ] 28 | -------------------------------------------------------------------------------- /rss.cabal: -------------------------------------------------------------------------------- 1 | cabal-version: 1.18 2 | -- Version 1.18 needed for extra-doc-files 3 | name: rss 4 | version: 3000.2.0.8 5 | x-revision: 1 6 | 7 | build-type: Simple 8 | copyright: Jeremy Shaw 2004, Bjorn Bringert 2004-2006 9 | maintainer: https://github.com/haskell-hvr/rss 10 | author: Jeremy Shaw, Bjorn Bringert 11 | license: PublicDomain 12 | homepage: https://github.com/haskell-hvr/rss 13 | bug-reports: https://github.com/haskell-hvr/rss/issues 14 | synopsis: A library for generating RSS 2.0 feeds. 15 | category: RSS 16 | description: This library allows you to generate [RSS 2.0](http://www.rssboard.org/rss-specification) feeds. 17 | 18 | extra-doc-files: 19 | README.md 20 | CHANGELOG.md 21 | 22 | tested-with: 23 | GHC == 9.12.2 24 | GHC == 9.10.2 25 | GHC == 9.8.4 26 | GHC == 9.6.7 27 | GHC == 9.4.8 28 | GHC == 9.2.8 29 | GHC == 9.0.2 30 | GHC == 8.10.7 31 | GHC == 8.8.4 32 | GHC == 8.6.5 33 | GHC == 8.4.4 34 | GHC == 8.2.2 35 | GHC == 8.0.2 36 | 37 | source-repository head 38 | type: git 39 | location: https://github.com/haskell-hvr/rss.git 40 | 41 | library 42 | exposed-modules: Text.RSS 43 | 44 | default-language: Haskell2010 45 | default-extensions: Trustworthy 46 | 47 | build-depends: base >= 4.9 && < 5 48 | , HaXml >= 1.24 && < 1.26 49 | , network-uri >= 2.6 && < 2.7 50 | , time >= 1.5 && < 2 51 | 52 | 53 | ghc-options: 54 | -Wall 55 | -Wno-trustworthy-safe 56 | -------------------------------------------------------------------------------- /rss.nix: -------------------------------------------------------------------------------- 1 | { mkDerivation, base, HaXml, network, network-uri, old-locale 2 | , stdenv, time 3 | }: 4 | mkDerivation { 5 | pname = "rss"; 6 | version = "HEAD"; 7 | src = ./.; 8 | libraryHaskellDepends = [ 9 | base HaXml network network-uri old-locale time 10 | ]; 11 | homepage = "https://github.com/basvandijk/rss"; 12 | description = "A library for generating RSS 2.0 feeds."; 13 | license = stdenv.lib.licenses.publicDomain; 14 | } 15 | --------------------------------------------------------------------------------