diff --git a/pkgs/development/compilers/cudatoolkit/default.nix b/pkgs/development/compilers/cudatoolkit/default.nix new file mode 100644 index 000000000000..fdb40be320c6 --- /dev/null +++ b/pkgs/development/compilers/cudatoolkit/default.nix @@ -0,0 +1,52 @@ +{ stdenv, fetchurl, patchelf, perl, ncurses, expat, python, zlib +, xlibs, fontconfig, freetype, unixODBC, alsaLib +} : + +stdenv.mkDerivation rec { + name = "cudatoolkit-4.2.9"; + + dontPatchELF = true; + dontStrip = true; + + src = + if stdenv.system == "x86_64-linux" then + fetchurl { + url = http://developer.download.nvidia.com/compute/cuda/4_2/rel/toolkit/cudatoolkit_4.2.9_linux_64_suse11.2.run; + sha256 = "1inngzwq520bhpdfrh5bm4cxfyf3hxj94jialjxgviri5bj9hz60"; + } + else throw "cudatoolkit does not support platform ${stdenv.system}"; + + buildInputs = [ perl ]; + + runtimeDependencies = [ + ncurses expat python zlib + xlibs.libX11 xlibs.libXext xlibs.libXrender xlibs.libXt xlibs.libXtst xlibs.libXi xlibs.libXext + fontconfig freetype unixODBC alsaLib + ]; + + rpath = "${stdenv.lib.makeLibraryPath runtimeDependencies}:${stdenv.gcc.gcc}/lib64"; + + unpackPhase = '' + sh $src --keep --noexec + cd pkg + ''; + + buildPhase = '' + find . -type f -executable -exec patchelf \ + --set-interpreter "$(cat $NIX_GCC/nix-support/dynamic-linker)" \ + '{}' \; || true + find . -type f -exec patchelf \ + --set-rpath $rpath:$out/lib:$out/lib64:$(cat $NIX_GCC/nix-support/orig-gcc)/lib \ + --force-rpath \ + '{}' \; || true + ''; + + installPhase = '' + mkdir $out + perl ./install-linux.pl --prefix="$out" + ''; + + meta = { + license = [ "nonfree" ]; + }; +} diff --git a/pkgs/development/libraries/haskell/accelerate-cuda/default.nix b/pkgs/development/libraries/haskell/accelerate-cuda/default.nix new file mode 100644 index 000000000000..388ca445768b --- /dev/null +++ b/pkgs/development/libraries/haskell/accelerate-cuda/default.nix @@ -0,0 +1,23 @@ +{ cabal, accelerate, binary, blazeBuilder, cryptohash, cuda +, fclabels, filepath, hashable, hashtables, languageCQuote +, mainlandPretty, mtl, srcloc, symbol, transformers +, unorderedContainers +}: + +cabal.mkDerivation (self: { + pname = "accelerate-cuda"; + version = "0.12.0.0"; + sha256 = "1h8rx8jcv3x7hg8fr23fzy59lcv72rb914vyczs40bgfr4cgdaaa"; + buildDepends = [ + accelerate binary blazeBuilder cryptohash cuda fclabels filepath + hashable hashtables languageCQuote mainlandPretty mtl srcloc symbol + transformers unorderedContainers + ]; + meta = { + homepage = "http://www.cse.unsw.edu.au/~chak/project/accelerate/"; + description = "Accelerate backend for NVIDIA GPUs"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ self.stdenv.lib.maintainers.andres ]; + }; +}) diff --git a/pkgs/development/libraries/haskell/accelerate-examples/default.nix b/pkgs/development/libraries/haskell/accelerate-examples/default.nix new file mode 100644 index 000000000000..6d93c63f0e21 --- /dev/null +++ b/pkgs/development/libraries/haskell/accelerate-examples/default.nix @@ -0,0 +1,27 @@ +{ cabal, accelerate, accelerateCuda, accelerateIo +, attoparsec, bmp, bytestringLexing, cmdargs, criterion, cuda +, deepseq, fclabels, filepath, gloss, hashtables, mtl, mwcRandom +, pgm, QuickCheck, random, testFramework, testFrameworkQuickcheck2 +, vector, vectorAlgorithms +}: + +cabal.mkDerivation (self: { + pname = "accelerate-examples"; + version = "0.12.0.0"; + sha256 = "08mkfr46vl8vgcsxvmbs499frvybfq0chbcj1chpb8rwy8w9fa9h"; + isLibrary = false; + isExecutable = true; + buildDepends = [ + accelerate accelerateCuda accelerateIo attoparsec + bmp bytestringLexing cmdargs criterion cuda deepseq fclabels + filepath gloss hashtables mtl mwcRandom pgm QuickCheck random + testFramework testFrameworkQuickcheck2 vector vectorAlgorithms + ]; + meta = { + homepage = "http://www.cse.unsw.edu.au/~chak/project/accelerate/"; + description = "Examples using the Accelerate library"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ self.stdenv.lib.maintainers.andres ]; + }; +}) diff --git a/pkgs/development/libraries/haskell/accelerate-io/default.nix b/pkgs/development/libraries/haskell/accelerate-io/default.nix new file mode 100644 index 000000000000..caa4eeaf7598 --- /dev/null +++ b/pkgs/development/libraries/haskell/accelerate-io/default.nix @@ -0,0 +1,15 @@ +{ cabal, accelerate, repa, vector }: + +cabal.mkDerivation (self: { + pname = "accelerate-io"; + version = "0.12.0.0"; + sha256 = "0jc6vcxmji11kj041cds6j90by3mvaybswgmsiflxdlf4zlagd6h"; + buildDepends = [ accelerate repa vector ]; + meta = { + homepage = "http://www.cse.unsw.edu.au/~chak/project/accelerate/"; + description = "Read and write Accelerate arrays in various formats"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ self.stdenv.lib.maintainers.andres ]; + }; +}) diff --git a/pkgs/development/libraries/haskell/accelerate/default.nix b/pkgs/development/libraries/haskell/accelerate/default.nix new file mode 100644 index 000000000000..d7e7205b83c5 --- /dev/null +++ b/pkgs/development/libraries/haskell/accelerate/default.nix @@ -0,0 +1,14 @@ +{ cabal }: + +cabal.mkDerivation (self: { + pname = "accelerate"; + version = "0.12.0.0"; + sha256 = "1hb1zqsh8598brnjhdds8knp9dfsdlshrx5c7lj4pgl37gqyb5q5"; + meta = { + homepage = "https://github.com/AccelerateHS/accelerate/"; + description = "An embedded language for accelerated array processing"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ self.stdenv.lib.maintainers.andres ]; + }; +}) diff --git a/pkgs/development/libraries/haskell/cuda/default.nix b/pkgs/development/libraries/haskell/cuda/default.nix new file mode 100644 index 000000000000..5c0614bc0b44 --- /dev/null +++ b/pkgs/development/libraries/haskell/cuda/default.nix @@ -0,0 +1,43 @@ +{ cabal, c2hs, cudatoolkit, extensibleExceptions, nvidia_x11 }: + +cabal.mkDerivation (self: { + pname = "cuda"; + version = "0.4.1.0"; + sha256 = "1drr95d4v3khidxr6na5vyq28bv5rqk2n676q0bydc4rqwhb1z6w"; + buildDepends = [ extensibleExceptions ]; + buildTools = [ c2hs ]; + extraLibraries = [ cudatoolkit nvidia_x11 self.stdenv.gcc ]; + # Perhaps this should be the default in cabal.nix ... + # + # The cudatoolkit provides both 64 and 32-bit versions of the + # library. GHC's linker fails if the wrong version is found first. + # We solve this by eliminating lib64 from the path on 32-bit + # platforms and putting lib64 first on 64-bit platforms. + + libPaths = if self.stdenv.is64bit then "lib64 lib" else "lib"; + + configurePhase = '' + for i in Setup.hs Setup.lhs; do + test -f $i && ghc --make $i + done + + for p in $extraBuildInputs $propagatedBuildNativeInputs; do + if [ -d "$p/include" ]; then + extraLibDirs="$extraLibDirs --extra-include-dir=$p/include" + fi + for d in $libPaths; do + if [ -d "$p/$d" ]; then + extraLibDirs="$extraLibDirs --extra-lib-dir=$p/$d" + fi + done + done + + ./Setup configure --verbose --prefix="$out" $libraryProfiling $extraLibDirs $configureFlags + ''; + meta = { + description = "FFI binding to the CUDA interface for programming NVIDIA GPUs"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ self.stdenv.lib.maintainers.andres ]; + }; +}) diff --git a/pkgs/development/libraries/haskell/exception-mtl/default.nix b/pkgs/development/libraries/haskell/exception-mtl/default.nix new file mode 100644 index 000000000000..9b378751ebf3 --- /dev/null +++ b/pkgs/development/libraries/haskell/exception-mtl/default.nix @@ -0,0 +1,15 @@ +{ cabal, exceptionTransformers, mtl, transformers }: + +cabal.mkDerivation (self: { + pname = "exception-mtl"; + version = "0.3.0.2"; + sha256 = "1mhk1z7hz50h8ssr4s7dzdxzn02rr0njxijdddfjjw71fln3nl5h"; + buildDepends = [ exceptionTransformers mtl transformers ]; + meta = { + homepage = "http://www.eecs.harvard.edu/~mainland/"; + description = "Exception monad transformer instances for mtl2 classes"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ self.stdenv.lib.maintainers.andres ]; + }; +}) diff --git a/pkgs/development/libraries/haskell/exception-transformers/default.nix b/pkgs/development/libraries/haskell/exception-transformers/default.nix new file mode 100644 index 000000000000..b1e0fcec5e0e --- /dev/null +++ b/pkgs/development/libraries/haskell/exception-transformers/default.nix @@ -0,0 +1,15 @@ +{ cabal, stm, transformers }: + +cabal.mkDerivation (self: { + pname = "exception-transformers"; + version = "0.3.0.2"; + sha256 = "1ah3dimnc980vkr2lycpl4nsb615gxqws6mv9j90mz6g165h9khf"; + buildDepends = [ stm transformers ]; + meta = { + homepage = "http://www.eecs.harvard.edu/~mainland/"; + description = "Type classes and monads for unchecked extensible exceptions"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ self.stdenv.lib.maintainers.andres ]; + }; +}) diff --git a/pkgs/development/libraries/haskell/language-c-quote/default.nix b/pkgs/development/libraries/haskell/language-c-quote/default.nix new file mode 100644 index 000000000000..24cfe6cafb31 --- /dev/null +++ b/pkgs/development/libraries/haskell/language-c-quote/default.nix @@ -0,0 +1,21 @@ +{ cabal, alex, exceptionMtl, exceptionTransformers, filepath, happy +, haskellSrcMeta, mainlandPretty, mtl, srcloc, syb, symbol +}: + +cabal.mkDerivation (self: { + pname = "language-c-quote"; + version = "0.3.1.0"; + sha256 = "0y3zfc43izvalm1lrbk286nmg4s3vgpj5v2j6j2saz3c7l2ly8z6"; + buildDepends = [ + exceptionMtl exceptionTransformers filepath haskellSrcMeta + mainlandPretty mtl srcloc syb symbol + ]; + buildTools = [ alex happy ]; + meta = { + homepage = "http://www.eecs.harvard.edu/~mainland/"; + description = "C/CUDA/OpenCL quasiquoting library"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ self.stdenv.lib.maintainers.andres ]; + }; +}) diff --git a/pkgs/development/libraries/haskell/language-c/0.3.2.1.nix b/pkgs/development/libraries/haskell/language-c/0.3.2.1.nix new file mode 100644 index 000000000000..154bc68c3c5c --- /dev/null +++ b/pkgs/development/libraries/haskell/language-c/0.3.2.1.nix @@ -0,0 +1,16 @@ +{ cabal, alex, filepath, happy, syb }: + +cabal.mkDerivation (self: { + pname = "language-c"; + version = "0.3.2.1"; + sha256 = "1qk86p88p2jk1cbgl8p5g19ip3nh6z22ddj5jac58r5ny076iimx"; + buildDepends = [ filepath syb ]; + buildTools = [ alex happy ]; + meta = { + homepage = "http://www.sivity.net/projects/language.c/"; + description = "Analysis and generation of C code"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ self.stdenv.lib.maintainers.andres ]; + }; +}) diff --git a/pkgs/development/libraries/haskell/language-c/default.nix b/pkgs/development/libraries/haskell/language-c/0.4.2.nix similarity index 100% rename from pkgs/development/libraries/haskell/language-c/default.nix rename to pkgs/development/libraries/haskell/language-c/0.4.2.nix diff --git a/pkgs/development/libraries/haskell/mainland-pretty/default.nix b/pkgs/development/libraries/haskell/mainland-pretty/default.nix new file mode 100644 index 000000000000..f4b49a6f409a --- /dev/null +++ b/pkgs/development/libraries/haskell/mainland-pretty/default.nix @@ -0,0 +1,15 @@ +{ cabal, srcloc, symbol }: + +cabal.mkDerivation (self: { + pname = "mainland-pretty"; + version = "0.1.2.0"; + sha256 = "0qhv8qfzcm5n1scgmxsv1c2qqnhvp8r0hmax22vzaq7jmlzwhj4p"; + buildDepends = [ srcloc symbol ]; + meta = { + homepage = "http://www.eecs.harvard.edu/~mainland/"; + description = "Pretty printing designed for printing source code"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ self.stdenv.lib.maintainers.andres ]; + }; +}) diff --git a/pkgs/development/libraries/haskell/pgm/default.nix b/pkgs/development/libraries/haskell/pgm/default.nix new file mode 100644 index 000000000000..b1be8dd6d035 --- /dev/null +++ b/pkgs/development/libraries/haskell/pgm/default.nix @@ -0,0 +1,15 @@ +{ cabal, parsec }: + +cabal.mkDerivation (self: { + pname = "pgm"; + version = "0.1.3"; + sha256 = "1byq8bacqgdpahf57ccwwa45wf9ij0kkgp89rg9flsv1g10364d4"; + buildDepends = [ parsec ]; + meta = { + homepage = "https://github.com/sergeyastanin/haskell-pgm"; + description = "Pure Haskell implementation of PGM image format"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ self.stdenv.lib.maintainers.andres ]; + }; +}) diff --git a/pkgs/development/libraries/haskell/srcloc/default.nix b/pkgs/development/libraries/haskell/srcloc/default.nix new file mode 100644 index 000000000000..a29d1bd662ce --- /dev/null +++ b/pkgs/development/libraries/haskell/srcloc/default.nix @@ -0,0 +1,15 @@ +{ cabal, syb, symbol }: + +cabal.mkDerivation (self: { + pname = "srcloc"; + version = "0.1.1.1"; + sha256 = "131g83sa0kjwy4bz6hcaxplywqd0899sw5r5x0nr0bffkhk91k60"; + buildDepends = [ syb symbol ]; + meta = { + homepage = "http://www.eecs.harvard.edu/~mainland/"; + description = "Data types for managing source code locations"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ self.stdenv.lib.maintainers.andres ]; + }; +}) diff --git a/pkgs/development/libraries/haskell/symbol/default.nix b/pkgs/development/libraries/haskell/symbol/default.nix new file mode 100644 index 000000000000..42cfd77f1c81 --- /dev/null +++ b/pkgs/development/libraries/haskell/symbol/default.nix @@ -0,0 +1,15 @@ +{ cabal, syb }: + +cabal.mkDerivation (self: { + pname = "symbol"; + version = "0.1.1.1"; + sha256 = "1vda97jh9jrvb4l9v9m3xzv8z96jdwf5fji643i6ff3n3h9ysn77"; + buildDepends = [ syb ]; + meta = { + homepage = "http://www.eecs.harvard.edu/~mainland/"; + description = "A 'Symbol' type for fast symbol comparison"; + license = self.stdenv.lib.licenses.bsd3; + platforms = self.ghc.meta.platforms; + maintainers = [ self.stdenv.lib.maintainers.andres ]; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 909cf0fd6621..e206d7165c6f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -544,6 +544,10 @@ let cron = callPackage ../tools/system/cron { # see also fcron }; + cudatoolkit = callPackage ../development/compilers/cudatoolkit { + python = python26; + }; + curl = makeOverridable (import ../tools/networking/curl) rec { fetchurl = fetchurlBoot; inherit stdenv zlib openssl libssh2; diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 83e37599fd8c..627c40ea8343 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -356,6 +356,14 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y); haskellSrcExts = self.haskellSrcExts_1_11_1; }; + accelerate = callPackage ../development/libraries/haskell/accelerate {}; + + accelerateCuda = callPackage ../development/libraries/haskell/accelerate-cuda {}; + + accelerateExamples = callPackage ../development/libraries/haskell/accelerate-examples {}; + + accelerateIo = callPackage ../development/libraries/haskell/accelerate-io {}; + ACVector = callPackage ../development/libraries/haskell/AC-Vector {}; abstractDeque = callPackage ../development/libraries/haskell/abstract-deque {}; @@ -447,7 +455,9 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y); bytestringTrie = callPackage ../development/libraries/haskell/bytestring-trie {}; - c2hs = callPackage ../development/libraries/haskell/c2hs {}; + c2hs = callPackage ../development/libraries/haskell/c2hs { + languageC = self.languageC_0_3_2_1; + }; Cabal_1_14_0 = callPackage ../development/libraries/haskell/Cabal/1.14.0.nix { cabal = self.cabal.override { Cabal = null; }; }; Cabal = null; # core package in GHC @@ -522,6 +532,10 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y); cryptoPubkeyTypes = callPackage ../development/libraries/haskell/crypto-pubkey-types {}; + cuda = callPackage ../development/libraries/haskell/cuda { + inherit (pkgs.linuxPackages) nvidia_x11; + }; + csv = callPackage ../development/libraries/haskell/csv {}; cssText = callPackage ../development/libraries/haskell/css-text {}; @@ -592,6 +606,10 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y); erf = callPackage ../development/libraries/haskell/erf {}; + exceptionMtl = callPackage ../development/libraries/haskell/exception-mtl {}; + + exceptionTransformers = callPackage ../development/libraries/haskell/exception-transformers {}; + explicitException = callPackage ../development/libraries/haskell/explicit-exception {}; executablePath = callPackage ../development/libraries/haskell/executable-path {}; @@ -678,8 +696,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y); GlomeVec = callPackage ../development/libraries/haskell/GlomeVec {}; gloss = callPackage ../development/libraries/haskell/gloss { - GLUT = self.GLUT22; - OpenGL = self.OpenGL24; + GLUT = self.GLUT23; + OpenGL = self.OpenGL25; }; GLURaw = callPackage ../development/libraries/haskell/GLURaw {}; @@ -693,6 +711,7 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y); OpenGL = self.OpenGL_2_5_0_0; }; GLUT22 = self.GLUT_2_2_2_1; + GLUT23 = self.GLUT_2_3_0_0; GLUT = self.GLUT_2_3_0_0; gtk = callPackage ../development/libraries/haskell/gtk { @@ -900,7 +919,11 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y); jsonTypes = callPackage ../development/libraries/haskell/jsonTypes {}; - languageC = callPackage ../development/libraries/haskell/language-c {}; + languageC_0_4_2 = callPackage ../development/libraries/haskell/language-c/0.4.2.nix {}; + languageC_0_3_2_1 = callPackage ../development/libraries/haskell/language-c/0.3.2.1.nix {}; + languageC = self.languageC_0_4_2; + + languageCQuote = callPackage ../development/libraries/haskell/language-c-quote/default.nix {}; languageJavascript = callPackage ../development/libraries/haskell/language-javascript {}; @@ -924,6 +947,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y); mathFunctions = callPackage ../development/libraries/haskell/math-functions {}; + mainlandPretty = callPackage ../development/libraries/haskell/mainland-pretty {}; + maude = callPackage ../development/libraries/haskell/maude { parsec = self.parsec3; }; @@ -1023,6 +1048,7 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y); OpenGL_2_4_0_2 = callPackage ../development/libraries/haskell/OpenGL/2.4.0.2.nix {}; OpenGL_2_5_0_0 = callPackage ../development/libraries/haskell/OpenGL/2.5.0.0.nix {}; OpenGL24 = self.OpenGL_2_4_0_2; + OpenGL25 = self.OpenGL_2_5_0_0; OpenGL = self.OpenGL_2_5_0_0; OpenGLRaw = callPackage ../development/libraries/haskell/OpenGLRaw {}; @@ -1071,6 +1097,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y); persistentTemplate = callPackage ../development/libraries/haskell/persistent-template {}; + pgm = callPackage ../development/libraries/haskell/pgm {}; + polyparse_1_7 = callPackage ../development/libraries/haskell/polyparse/1.7.nix {}; polyparse_1_8 = callPackage ../development/libraries/haskell/polyparse/1.8.nix {}; polyparse = self.polyparse_1_8; @@ -1202,6 +1230,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y); socks = callPackage ../development/libraries/haskell/socks {}; + srcloc = callPackage ../development/libraries/haskell/srcloc {}; + stateref = callPackage ../development/libraries/haskell/stateref {}; StateVar = callPackage ../development/libraries/haskell/StateVar {}; @@ -1277,6 +1307,8 @@ let result = let callPackage = x : y : modifyPrio (newScope result.final x y); libc = pkgs.stdenv.gcc.libc; }; + symbol = callPackage ../development/libraries/haskell/symbol {}; + systemFilepath = callPackage ../development/libraries/haskell/system-filepath {}; systemFileio = callPackage ../development/libraries/haskell/system-fileio {};