packages feed

cabal2nix 1.50 → 1.51

raw patch · 4 files changed

+25/−9 lines, 4 files

Files

cabal2nix.cabal view
@@ -1,5 +1,5 @@ Name:                   cabal2nix-Version:                1.50+Version:                1.51 Copyright:              Peter Simons, Andres Loeh License:                BSD3 License-File:           LICENSE@@ -34,8 +34,8 @@   .   The only required argument is the path to the cabal file. For example:   .-  > cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.50/cabal2nix.cabal-  > cabal2nix cabal://cabal2nix-1.50+  > cabal2nix http://hackage.haskell.org/packages/archive/cabal2nix/1.51/cabal2nix.cabal+  > cabal2nix cabal://cabal2nix-1.51   .   If the @--sha256@ option has not been specified, cabal2nix calls   @nix-prefetch-url@ to determine the hash automatically. This causes
src/Cabal2Nix/Flags.hs view
@@ -7,7 +7,10 @@ configureCabalFlags (PackageIdentifier (PackageName name) _)  | name == "accelerate-examples"= [disable "opencl"]  | name == "pandoc"             = [enable "blaze_html_0_5"]- | name == "git-annex"          = [enable "S3", enable "WebDAV", enable "Inotify", enable "Dbus", enable "Assistant", enable "Webapp", enable "Pairing", enable "XMPP", enable "DNS"]+ | name == "git-annex"          = [ enable "S3", enable "WebDAV", enable "Inotify"+                                  , enable "Dbus", disable "Assistant", disable "Webapp"+                                  , enable "Pairing", enable "XMPP", enable "DNS"+                                  , enable "Production", enable "TDFA"]  | name == "haskeline"          = [enable "terminfo"]  | name == "reactive-banana-wx" = [disable "buildExamples"]  | name == "xmobar"             = [enable "with_xft", enable "with_iwlib"]
src/Cabal2Nix/Generate.hs view
@@ -17,7 +17,7 @@ cabal2nix cabal = normalize $ postProcess MkDerivation   { pname          = let Cabal.PackageName x = Cabal.pkgName pkg in x   , version        = Cabal.pkgVersion pkg-  , sha256         = "cabal2nix left the she256 field undefined"+  , sha256         = "cabal2nix left the sha256 field undefined"   , isLibrary      = isJust (Cabal.library tpkg)   , isExecutable   = not (null (Cabal.executables tpkg))   , buildDepends   = map unDep deps@@ -55,7 +55,7 @@                         (configureCabalFlags pkg)                         (const True)                         (Platform I386 Linux)                   -- shouldn't be hardcoded-                        (CompilerId GHC (Version [7,4,1] []))   -- dito+                        (CompilerId GHC (Version [7,6,3] []))   -- dito                         [] cabal  unDep :: Cabal.Dependency -> String
src/Cabal2Nix/PostProcess.hs view
@@ -16,7 +16,7 @@   | pname == "editline"         = deriv { extraLibs = "libedit":extraLibs }   | pname == "epic"             = deriv { extraLibs = "gmp":"boehmgc":extraLibs, buildTools = "happy":buildTools }   | pname == "ghc-mod"          = deriv { phaseOverrides = ghcModPostInstall, buildTools = "emacs":buildTools }-  | pname == "git-annex"        = deriv { buildTools = "git":"rsync":"gnupg1":"curl":"lsof":"openssh":"bup":buildTools }+  | pname == "git-annex"        = deriv { phaseOverrides = gitAnnexOverrides, buildTools = "git":"rsync":"gnupg1":"curl":"lsof":"openssh":"bup":buildTools }   | pname == "glade"            = deriv { extraLibs = "pkgconfig":"libc":extraLibs, pkgConfDeps = "gtkC":delete "gtk" pkgConfDeps }   | pname == "glib"             = deriv { extraLibs = "pkgconfig":"libc":extraLibs }   | pname == "GLUT"             = deriv { extraLibs = "glut":"libSM":"libICE":"libXmu":"libXi":"mesa":extraLibs }@@ -30,9 +30,11 @@   | pname == "highlighting-kate"= highlightingKatePostProcessing deriv   | pname == "hmatrix"          = deriv { extraLibs = "gsl":"liblapack":"blas":extraLibs }   | pname == "hspec"            = deriv { doCheck = False }-  | pname == "idris"            = deriv { buildTools = "happy":buildTools }+  | pname == "idris"            = deriv { buildTools = "happy":buildTools, extraLibs = "gmp":extraLibs }   | pname == "language-c-quote" = deriv { buildTools = "alex":"happy":buildTools }+  | pname == "language-java"    = deriv { buildDepends = "syb":buildDepends }   | pname == "leksah-server"    = deriv { buildDepends = "process-leksah":buildDepends }+  | pname == "libffi"           = deriv { extraLibs = delete "ffi" extraLibs }   | pname == "llvm-base"        = deriv { extraLibs = "llvm":extraLibs }   | pname == "multiarg"         = deriv { buildDepends = "utf8String":buildDepends }   | pname == "OpenAL"           = deriv { extraLibs = "openal":extraLibs }@@ -48,8 +50,8 @@   | pname == "terminfo"         = deriv { extraLibs = "ncurses":extraLibs }   | pname == "threadscope"      = deriv { configureFlags = "--ghc-options=-rtsopts":configureFlags }   | pname == "vacuum"           = deriv { extraLibs = "ghcPaths":extraLibs }-  | pname == "wxcore"           = deriv { extraLibs = "wxGTK":"mesa":"libX11":extraLibs }   | pname == "wxc"              = deriv { extraLibs = "wxGTK":"mesa":"libX11":extraLibs, phaseOverrides = wxcPostInstall }+  | pname == "wxcore"           = deriv { extraLibs = "wxGTK":"mesa":"libX11":extraLibs }   | pname == "X11" && version >= Version [1,6] []                                 = deriv { extraLibs = "libXinerama":"libXext":"libXrender":extraLibs }   | pname == "X11"              = deriv { extraLibs = "libXinerama":"libXext":extraLibs }@@ -132,5 +134,16 @@   [ "postInstall = ''"   , "  mkdir -p $out/share/man/man1"   , "  mv $out/share/xmonad-*/man/*.1 $out/share/man/man1/"+  , "'';"+  ]++gitAnnexOverrides :: String+gitAnnexOverrides = unlines+  [ "preConfigure = \"patchShebangs .\";"+  , "checkPhase = ''"+  , "  export HOME=\"$NIX_BUILD_TOP/tmp\""+  , "  mkdir \"$HOME\""+  , "  cp dist/build/git-annex/git-annex git-annex"+  , "  ./git-annex test"   , "'';"   ]