Cabal updates
This commit is contained in:
		
							
								
								
									
										55
									
								
								HELPS.cabal
									
									
									
									
									
								
							
							
						
						
									
										55
									
								
								HELPS.cabal
									
									
									
									
									
								
							| @ -1,4 +1,4 @@ | ||||
| cabal-version: 1.12 | ||||
| cabal-version: 3.0 | ||||
|  | ||||
| name:           HELPS | ||||
| version:        0.0.1 | ||||
| @ -9,13 +9,27 @@ copyright:      James Eversole | ||||
| license:        ISC | ||||
| license-file:   LICENSE | ||||
| build-type:     Simple | ||||
| with-compiler:  ghc-9.6.6 | ||||
| documentation:  True | ||||
| extra-source-files: | ||||
|     README | ||||
|  | ||||
| executable Main | ||||
|   main-is: Main.hs | ||||
|   hs-source-dirs: | ||||
|       src | ||||
| common global | ||||
|   build-depends:  | ||||
|     base | ||||
|     , aeson | ||||
|     , bytestring | ||||
|     , effectful | ||||
|     , exceptions | ||||
|     , lucid | ||||
|     , mtl | ||||
|     , postgresql-simple | ||||
|     , resource-pool | ||||
|     , servant-server | ||||
|     , text | ||||
|     , time | ||||
|     , utf8-string | ||||
|     , warp | ||||
|   default-extensions: | ||||
|       BlockArguments | ||||
|       ConstraintKinds | ||||
| @ -31,25 +45,24 @@ executable Main | ||||
|       StrictData | ||||
|       TypeFamilies | ||||
|   ghc-options: -threaded -rtsopts -with-rtsopts=-N -optl-pthread -fPIC | ||||
|   build-depends: | ||||
|     base | ||||
|     , aeson | ||||
|     , bytestring | ||||
|     , effectful | ||||
|     , exceptions | ||||
|     , lucid | ||||
|     , mtl | ||||
|     , postgresql-simple | ||||
|     , resource-pool | ||||
|     , servant-server | ||||
|     , text | ||||
|     , time | ||||
|     , utf8-string | ||||
|     , warp | ||||
|   default-language: GHC2021 | ||||
|  | ||||
| executable Main | ||||
|   import: global | ||||
|   hs-source-dirs: | ||||
|     src | ||||
|   main-is: Main.hs | ||||
|   other-modules: | ||||
|     Core | ||||
|     Database | ||||
|     Handlers | ||||
|     Logger | ||||
|     Routes | ||||
|   default-language: GHC2021 | ||||
|   build-depends:  | ||||
|     HELPS | ||||
|  | ||||
| library  | ||||
|   import: global | ||||
|   hs-source-dirs: | ||||
|     src | ||||
|   exposed-modules: Core, Database, Handlers, Logger, Routes | ||||
|  | ||||
							
								
								
									
										25
									
								
								flake.nix
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								flake.nix
									
									
									
									
									
								
							| @ -12,24 +12,29 @@ | ||||
|       packageName       = "HELPS"; | ||||
|       containerPackageName = "${packageName}-container"; | ||||
|  | ||||
|       c2n = haskellPackages.callCabal2nix packageName self rec {}; | ||||
|       HELPS = c2n.overrideAttrs (old: { | ||||
|         doHaddock = true; | ||||
|         enableSeparateDocOutput = false; | ||||
|         enableSharedExecutables = false; | ||||
|         enableSharedLibraries = false; | ||||
|       }); | ||||
|  | ||||
|       haskellPackages = pkgs.haskellPackages; | ||||
|  | ||||
|       enableSharedExecutables = false; | ||||
|       enableSharedLibraries = false; | ||||
|  | ||||
|       HELPS = pkgs.haskell.lib.justStaticExecutables self.packages.${system}.default; | ||||
|     in { | ||||
|       packages.${packageName} = | ||||
|         haskellPackages.callCabal2nix packageName self rec {}; | ||||
|       packages.${packageName} = pkgs.haskell.lib.justStaticExecutables HELPS; | ||||
|       packages.HELPSDocs = HELPS; | ||||
|  | ||||
|       packages.default = self.packages.${system}.${packageName}; | ||||
|       defaultPackage = self.packages.${system}.default; | ||||
|  | ||||
|       devShells.default = pkgs.mkShell { | ||||
|         buildInputs = with pkgs; [ | ||||
|           ghcid | ||||
|           cabal-install | ||||
|           ghc | ||||
|           self.packages.${system}.default | ||||
|           pkgs.haskellPackages.cabal-install | ||||
|           pkgs.haskellPackages.ghc | ||||
|           pkgs.haskellPackages.ghcid | ||||
|           pkgs.haskellPackages.haskell-language-server | ||||
|         ]; | ||||
|         inputsFrom = builtins.attrValues self.packages.${system}; | ||||
|       }; | ||||
|  | ||||
							
								
								
									
										1
									
								
								result
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								result
									
									
									
									
									
										Symbolic link
									
								
							| @ -0,0 +1 @@ | ||||
| /nix/store/mjqr6gajan8a4nmhl4s6khq4lf6phrf3-HELPS-0.0.1 | ||||
| @ -68,7 +68,9 @@ data LogLevel = Info | Warning | Error | ||||
| instance ToField LogLevel where | ||||
|   toField level = toField (T.pack (show level)) | ||||
|  | ||||
| -- | ||||
| -- Utility | ||||
| --  | ||||
| liftIOE :: (IOE :> es, Error ServerError :> es) => IO a -> Eff es a | ||||
| -- Lift IO into Eff and catch IOExceptions | ||||
| liftIOE m = liftIO m `catch` \(e::IOException) -> do | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 James Eversole
					James Eversole