-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Convert Cabal files into Nix build instructions. -- -- Convert Cabal files into Nix build instructions. Users of Nix can -- install the latest version by running: -- --
--   nix-env -i cabal2nix
--   
@package cabal2nix @version 2.2 module Distribution.Nixpkgs.Haskell.OrphanInstances instance Control.DeepSeq.NFData Distribution.PackageDescription.SetupBuildInfo instance (Control.DeepSeq.NFData v, Control.DeepSeq.NFData c, Control.DeepSeq.NFData a) => Control.DeepSeq.NFData (Distribution.PackageDescription.CondTree v c a) instance Control.DeepSeq.NFData Distribution.System.Arch instance Control.DeepSeq.NFData Distribution.PackageDescription.Benchmark instance Control.DeepSeq.NFData Distribution.PackageDescription.BenchmarkInterface instance Control.DeepSeq.NFData Distribution.PackageDescription.BenchmarkType instance Control.DeepSeq.NFData Distribution.PackageDescription.BuildInfo instance Control.DeepSeq.NFData Distribution.PackageDescription.BuildType instance Control.DeepSeq.NFData Distribution.Compiler.CompilerFlavor instance Control.DeepSeq.NFData Distribution.PackageDescription.ConfVar instance Control.DeepSeq.NFData Distribution.Package.Dependency instance Control.DeepSeq.NFData Distribution.PackageDescription.Executable instance Control.DeepSeq.NFData Language.Haskell.Extension.Extension instance Control.DeepSeq.NFData Distribution.PackageDescription.Flag instance Control.DeepSeq.NFData Distribution.PackageDescription.FlagName instance Control.DeepSeq.NFData Distribution.PackageDescription.GenericPackageDescription instance Control.DeepSeq.NFData Language.Haskell.Extension.KnownExtension instance Control.DeepSeq.NFData Language.Haskell.Extension.Language instance Control.DeepSeq.NFData Distribution.PackageDescription.Library instance Control.DeepSeq.NFData Distribution.License.License instance Control.DeepSeq.NFData Distribution.ModuleName.ModuleName instance Control.DeepSeq.NFData Distribution.PackageDescription.ModuleReexport instance Control.DeepSeq.NFData Distribution.PackageDescription.ModuleRenaming instance Control.DeepSeq.NFData Distribution.System.OS instance Control.DeepSeq.NFData Distribution.PackageDescription.PackageDescription instance Control.DeepSeq.NFData Distribution.PackageDescription.RepoKind instance Control.DeepSeq.NFData Distribution.PackageDescription.RepoType instance Control.DeepSeq.NFData Distribution.PackageDescription.SourceRepo instance Control.DeepSeq.NFData Distribution.PackageDescription.TestSuite instance Control.DeepSeq.NFData Distribution.PackageDescription.TestSuiteInterface instance Control.DeepSeq.NFData Distribution.PackageDescription.TestType instance Control.DeepSeq.NFData Distribution.Version.VersionRange instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Distribution.PackageDescription.Condition a) instance Control.DeepSeq.NFData Distribution.System.Platform instance Control.DeepSeq.NFData Distribution.Compiler.CompilerInfo instance Control.DeepSeq.NFData Distribution.Compiler.CompilerId instance Control.DeepSeq.NFData Distribution.Compiler.AbiTag instance Data.String.IsString Distribution.Package.PackageName instance Data.String.IsString Data.Version.Version instance Data.String.IsString Distribution.Package.PackageIdentifier instance Data.String.IsString Distribution.Package.Dependency instance Data.String.IsString Distribution.Compiler.CompilerId instance Data.String.IsString Distribution.System.Platform instance Data.Aeson.Types.FromJSON.FromJSON Distribution.System.Platform instance Data.Aeson.Types.FromJSON.FromJSON Distribution.Package.PackageName instance Data.Aeson.Types.FromJSON.FromJSON Distribution.Package.PackageIdentifier instance Data.Aeson.Types.FromJSON.FromJSON Distribution.Package.Dependency instance Data.Aeson.Types.FromJSON.FromJSON Distribution.Compiler.CompilerInfo module Distribution.Nixpkgs.Haskell.Hackage -- | A variant of readHackage that adds the SHA256 digest of the -- original Cabal file to the parsed GenericPackageDescription. -- That hash is required to build packages with an "edited" cabal file, -- because Nix needs to download the edited file and patch it into the -- original tarball. readHashedHackage :: IO Hackage readHashedHackage' :: FilePath -> IO Hackage module Distribution.Nixpkgs.Haskell.FromCabal.Name -- | Map Cabal names to Nix attribute names. toNixName :: PackageName -> Identifier -- | Map library names specified in Cabal files to Nix package identifiers. -- -- TODO: This list should not be hard-coded here; it belongs into the -- Nixpkgs repository. -- -- TODO: Re-use hook matching system from PostProcess.hs here. libNixName :: String -> [Identifier] -- | Map build tool names to Nix attribute names. buildToolNixName :: String -> [Identifier] module Distribution.Nixpkgs.Haskell.FromCabal.License fromCabalLicense :: License -> License module Distribution.Nixpkgs.Haskell.FromCabal.Flags configureCabalFlags :: PackageIdentifier -> FlagAssignment module Distribution.Nixpkgs.Haskell.Constraint type Constraint = Dependency satisfiesConstraint :: PackageIdentifier -> Constraint -> Bool satisfiesConstraints :: PackageIdentifier -> [Constraint] -> Bool module Distribution.Nixpkgs.Haskell.FromCabal.Configuration data Configuration Configuration :: CompilerInfo -> Set PackageIdentifier -> [Constraint] -> [Constraint] -> Map PackageName (Set Platform) -> Map Identifier (Set PackageName) -> Configuration -- | Target compiler. Used by finalizePackageDescription to choose -- appropriate flags and dependencies. [compilerInfo] :: Configuration -> CompilerInfo -- | Compiler core packages that are also found on Hackage. [corePackages] :: Configuration -> Set PackageIdentifier -- | These packages replace the latest respective version during dependency -- resolution. [defaultPackageOverrides] :: Configuration -> [Constraint] -- | These packages are added to the generated set, but the play no role -- during dependency resolution. [extraPackages] :: Configuration -> [Constraint] -- | We know that these packages won't build, so we give them an empty -- meta.hydraPlatforms attribute to avoid cluttering our Hydra output -- with lots of failure messages. [dontDistributePackages] :: Configuration -> Map PackageName (Set Platform) -- | This information is used by the hackage2nix utility to -- determine the maintainers for a given Haskell package. [packageMaintainers] :: Configuration -> Map Identifier (Set PackageName) readConfiguration :: FilePath -> IO Configuration assertConsistency :: Monad m => Configuration -> m Configuration instance GHC.Generics.Generic Distribution.Nixpkgs.Haskell.FromCabal.Configuration.Configuration instance GHC.Show.Show Distribution.Nixpkgs.Haskell.FromCabal.Configuration.Configuration instance Control.DeepSeq.NFData Distribution.Nixpkgs.Haskell.FromCabal.Configuration.Configuration instance Data.Aeson.Types.FromJSON.FromJSON Distribution.Nixpkgs.Haskell.FromCabal.Configuration.Configuration instance Data.Aeson.Types.FromJSON.FromJSON Language.Nix.Identifier.Identifier instance Data.Aeson.Types.FromJSON.FromJSONKey Language.Nix.Identifier.Identifier instance Data.Aeson.Types.FromJSON.FromJSONKey Distribution.Package.PackageName module Distribution.Nixpkgs.Haskell.BuildInfo data BuildInfo haskell :: Lens' BuildInfo (Set Binding) pkgconfig :: Lens' BuildInfo (Set Binding) system :: Lens' BuildInfo (Set Binding) tool :: Lens' BuildInfo (Set Binding) pPrintBuildInfo :: String -> BuildInfo -> Doc instance Control.Lens.Each.Each Distribution.Nixpkgs.Haskell.BuildInfo.BuildInfo Distribution.Nixpkgs.Haskell.BuildInfo.BuildInfo (Data.Set.Base.Set Language.Nix.Binding.Binding) (Data.Set.Base.Set Language.Nix.Binding.Binding) instance GHC.Base.Monoid Distribution.Nixpkgs.Haskell.BuildInfo.BuildInfo instance Control.DeepSeq.NFData Distribution.Nixpkgs.Haskell.BuildInfo.BuildInfo instance GHC.Generics.Generic Distribution.Nixpkgs.Haskell.BuildInfo.BuildInfo instance GHC.Classes.Eq Distribution.Nixpkgs.Haskell.BuildInfo.BuildInfo instance GHC.Show.Show Distribution.Nixpkgs.Haskell.BuildInfo.BuildInfo module Distribution.Nixpkgs.Fetch -- | A source is a location from which we can fetch, such as a HTTP URL, a -- GIT URL, .... data Source Source :: String -> String -> Hash -> String -> Source -- | URL to fetch from. [sourceUrl] :: Source -> String -- | Revision to use. For protocols where this doesn't make sense (such as -- HTTP), this should be the empty string. [sourceRevision] :: Source -> String -- | The expected hash of the source, if available. [sourceHash] :: Source -> Hash -- | Directory where Cabal file is found. [sourceCabalDir] :: Source -> String data Hash Certain :: String -> Hash Guess :: String -> Hash UnknownHash :: Hash -- | A source for a derivation. It always needs a hash and also has a -- protocol attached to it (url, git, svn, ...). A -- DerivationSource also always has it's revision fully resolved -- (not relative revisions like master, HEAD, etc). data DerivationSource DerivationSource :: String -> String -> String -> String -> DerivationSource -- | The kind of the source. The name of the build-support fetch derivation -- should be fetchkind. [derivKind] :: DerivationSource -> String -- | URL to fetch from. [derivUrl] :: DerivationSource -> String -- | Revision to use. Leave empty if the fetcher doesn't support revisions. [derivRevision] :: DerivationSource -> String -- | The hash of the source. [derivHash] :: DerivationSource -> String fromDerivationSource :: DerivationSource -> Source -- | Fetch a source, trying any of the various nix-prefetch-* scripts. fetch :: forall a. (String -> MaybeT IO a) -> Source -> IO (Maybe (DerivationSource, a)) -- | Like fetch, but allows to specify which script to use. fetchWith :: (Bool, String, [String]) -> Source -> MaybeT IO (DerivationSource, FilePath) instance GHC.Generics.Generic Distribution.Nixpkgs.Fetch.DerivationSource instance GHC.Classes.Ord Distribution.Nixpkgs.Fetch.DerivationSource instance GHC.Classes.Eq Distribution.Nixpkgs.Fetch.DerivationSource instance GHC.Show.Show Distribution.Nixpkgs.Fetch.DerivationSource instance GHC.Generics.Generic Distribution.Nixpkgs.Fetch.Source instance GHC.Classes.Ord Distribution.Nixpkgs.Fetch.Source instance GHC.Classes.Eq Distribution.Nixpkgs.Fetch.Source instance GHC.Show.Show Distribution.Nixpkgs.Fetch.Source instance GHC.Generics.Generic Distribution.Nixpkgs.Fetch.Hash instance GHC.Classes.Ord Distribution.Nixpkgs.Fetch.Hash instance GHC.Classes.Eq Distribution.Nixpkgs.Fetch.Hash instance GHC.Show.Show Distribution.Nixpkgs.Fetch.Hash instance Control.DeepSeq.NFData Distribution.Nixpkgs.Fetch.Source instance Control.DeepSeq.NFData Distribution.Nixpkgs.Fetch.Hash instance Control.DeepSeq.NFData Distribution.Nixpkgs.Fetch.DerivationSource instance Data.Aeson.Types.FromJSON.FromJSON Distribution.Nixpkgs.Fetch.DerivationSource module Distribution.Nixpkgs.Haskell.Derivation -- | A represtation of Nix expressions for building Haskell packages. The -- data type correspond closely to the definition of -- PackageDescription from Cabal. data Derivation nullDerivation :: Derivation pkgid :: Lens' Derivation PackageIdentifier revision :: Lens' Derivation Int src :: Lens' Derivation DerivationSource subpath :: Lens' Derivation FilePath isLibrary :: Lens' Derivation Bool isExecutable :: Lens' Derivation Bool extraFunctionArgs :: Lens' Derivation (Set Binding) libraryDepends :: Lens' Derivation BuildInfo executableDepends :: Lens' Derivation BuildInfo testDepends :: Lens' Derivation BuildInfo configureFlags :: Lens' Derivation (Set String) cabalFlags :: Lens' Derivation FlagAssignment runHaddock :: Lens' Derivation Bool jailbreak :: Lens' Derivation Bool doCheck :: Lens' Derivation Bool testTarget :: Lens' Derivation String hyperlinkSource :: Lens' Derivation Bool enableSplitObjs :: Lens' Derivation Bool enableLibraryProfiling :: Lens' Derivation Bool enableExecutableProfiling :: Lens' Derivation Bool phaseOverrides :: Lens' Derivation String editedCabalFile :: Lens' Derivation String metaSection :: Lens' Derivation Meta dependencies :: Traversal' Derivation BuildInfo setupDepends :: Lens' Derivation BuildInfo benchmarkDepends :: Lens' Derivation BuildInfo instance Distribution.Package.Package Distribution.Nixpkgs.Haskell.Derivation.Derivation instance Control.DeepSeq.NFData Distribution.Nixpkgs.Haskell.Derivation.Derivation instance Text.PrettyPrint.HughesPJClass.Pretty Distribution.Nixpkgs.Haskell.Derivation.Derivation instance GHC.Generics.Generic Distribution.Nixpkgs.Haskell.Derivation.Derivation instance GHC.Classes.Eq Distribution.Nixpkgs.Haskell.Derivation.Derivation instance GHC.Show.Show Distribution.Nixpkgs.Haskell.Derivation.Derivation module Distribution.Nixpkgs.Haskell module Distribution.Nixpkgs.Haskell.FromCabal.Normalize normalize :: Derivation -> Derivation -- | When a flag is specified multiple times, the first occurrence counts. -- This is counter-intuitive, IMHO, but it's how cabal does it. Flag -- names are spelled in all lowercase. -- --
--   >>> normalizeCabalFlags [(FlagName "foo", True), (FlagName "FOO", True), (FlagName "Foo", False)]
--   [(FlagName "foo",True)]
--   
normalizeCabalFlags :: FlagAssignment -> FlagAssignment module Distribution.Nixpkgs.Haskell.FromCabal.PostProcess postProcess :: Derivation -> Derivation module Distribution.Nixpkgs.Haskell.FromCabal type HaskellResolver = Dependency -> Bool type NixpkgsResolver = Identifier -> Maybe Binding fromGenericPackageDescription :: HaskellResolver -> NixpkgsResolver -> Platform -> CompilerInfo -> FlagAssignment -> [Constraint] -> GenericPackageDescription -> Derivation fromPackageDescription :: HaskellResolver -> NixpkgsResolver -> [Dependency] -> FlagAssignment -> PackageDescription -> Derivation module Distribution.Nixpkgs.Haskell.PackageSourceSpec data Package Package :: DerivationSource -> GenericPackageDescription -> Package [pkgSource] :: Package -> DerivationSource [pkgCabal] :: Package -> GenericPackageDescription getPackage :: Maybe String -> Source -> IO Package sourceFromHackage :: Hash -> String -> String -> IO DerivationSource instance GHC.Show.Show Distribution.Nixpkgs.Haskell.PackageSourceSpec.Package