mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-27 05:43:50 +03:00
fff1ba967e
Just install ghc68_wrapper which will install the required dependencies ghc (and libraries) itself. The list libraries given in the wrapper attribute set can be user tuned in the future ? An alternative would be creating something similar to the gcc/g++ include/ lib/ scheme which is could be used by ghc to find installed packages.. svn path=/nixpkgs/trunk/; revision=9581
26 lines
874 B
Haskell
26 lines
874 B
Haskell
{-# OPTIONS_GHC -fglasgow-exts #-}
|
|
module Main where
|
|
import Distribution.InstalledPackageInfo (InstalledPackageInfo (..))
|
|
import Distribution.Package (showPackageId)
|
|
import System.FilePath
|
|
import System.Environment
|
|
|
|
usage = unlines [
|
|
"<appname> in outDir"
|
|
, "reads package db appname"
|
|
, "and creates a package database for each contained package in outDir"
|
|
, ""
|
|
, "The purpose is to be able to control availible packages to ensure purity in nix."
|
|
, "Separating each package from the auomated ghc build process is to painful (for me)"
|
|
]
|
|
|
|
main = do
|
|
args <- getArgs
|
|
case args of
|
|
[inFile, outDir] -> do
|
|
(packagedb :: [InstalledPackageInfo] ) <- fmap read $ readFile inFile
|
|
mapM_ (\pi -> let fn = outDir </> (showPackageId $ package pi) ++ ".conf"
|
|
in writeFile fn (show [pi])
|
|
) packagedb
|
|
_ -> putStrLn usage
|