From ffb53a0e6f47b059cfc5e5b07a0ff5f165a36db6 Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Fri, 26 Jun 2009 16:52:54 +0000 Subject: [PATCH] adding sqlalchemy which is a nice orm mapper for python svn path=/nixpkgs/trunk/; revision=16059 --- .../interpreters/python-new/2.5/default.nix | 62 +++++++++++++++++++ pkgs/misc/bleeding-edge-fetch-infos.nix | 8 +++ 2 files changed, 70 insertions(+) diff --git a/pkgs/development/interpreters/python-new/2.5/default.nix b/pkgs/development/interpreters/python-new/2.5/default.nix index 1e8917cc0096..76a9317dfae5 100644 --- a/pkgs/development/interpreters/python-new/2.5/default.nix +++ b/pkgs/development/interpreters/python-new/2.5/default.nix @@ -103,6 +103,7 @@ in libPython = t.version; # used to find all python libraries fitting this version (-> see name all below) }; mergeAttrBy = { + postPhases = lib.concat; pyCheck = x : y : "${x}\n${y}"; }; }; @@ -548,6 +549,67 @@ in }; }; + sqlalchemy05 = t.pythonLibSetup.merge { + name = "sqlalchemy-0.5.5-svn-trunk"; + pyCheck = '' + import sqlalchemy + import sqlalchemy.orm + import sqlalchemy.orm.collections + ''; + src = p.bleedingEdgeRepos.sourceByName "sqlalchemy05"; + meta = { + description = "sql orm wrapper for python"; + homepage = http://www.sqlalchemy.org; + license = "MIT"; + }; + postPhases = ["installMigration"]; + + buildInputs = [ t.setuptools /* required for migration lib */ ]; + + /* impure ? I don't care right now + Reading http://pypi.python.org/simple/decorator/ + Reading http://www.phyast.pitt.edu/~micheles/python/documentation.html + Best match: decorator 3.0.1 + Downloading http://pypi.python.org/packages/source/d/decorator/decorator-3.0.1.tar.gz#md5=c4130a467be7f71154976c84af4a04c6 + + iElectric: column.alter could be broken .. + */ + installMigration = '' + cd $TMP + mkdir migrate + cd migrate + unpackFile ${p.bleedingEdgeRepos.sourceByName "sqlalchemyMigrate"} + cd * + python setup.py $setupFlags build + python setup.py $setupFlags install --prefix=$out + echo "import migrate.changeset.schema" | python + ''; + + /* + + mv $out/lib/python2.5/site-packages/sqlalchemy_migrate-0.5.5.dev_r0-py2.5.egg/* \ + $out/lib/python2.5/site-packages + */ + }; + + /* doesn't work on its own, its included in sqlalchemy05 for that reason. + sqlalchemyMigrate = t.pythonLibSetup.merge { + name = "sqlalchemy-migrate-svn"; + buildInputs = [ t.setuptools t.sqlalchemy05 ]; + pyCheck = '' + import migrate + import migrate.changeset + import migrate.changeset.schema + ''; + src = p.bleedingEdgeRepos.sourceByName "sqlalchemyMigrate"; + meta = { + description = "sqlalchemy database versioning and scheme migration"; + homepage = http://packages.python.org/sqlalchemy-migrate/download.html; + license = "MIT"; + }; + }; + */ + ### python applications pythonExStub = composableDerivation {} { diff --git a/pkgs/misc/bleeding-edge-fetch-infos.nix b/pkgs/misc/bleeding-edge-fetch-infos.nix index f1e50e457a91..88cf062f2a0f 100644 --- a/pkgs/misc/bleeding-edge-fetch-infos.nix +++ b/pkgs/misc/bleeding-edge-fetch-infos.nix @@ -247,4 +247,12 @@ url = "http://mawercer.de/~nix/repos/ctags-703.tar.gz"; sha256 = "3f897b303f446aa8b52832d2aef280d359979bb2cd8768a2e70b6475adc64d61"; }; + sqlalchemy05 = args: with args; fetchurl { # Fri Jun 26 00:00:40 CEST 2009 + url = "http://mawercer.de/~nix/repos/sqlalchemy05-6076.tar.gz"; + sha256 = "7baad2cda5a61bcbc4093a6026727d69bc7bd7c0399e25e479eaa2e2000f69b1"; + }; + sqlalchemyMigrate = args: with args; fetchurl { # Fri Jun 26 00:22:43 CEST 2009 + url = "http://mawercer.de/~nix/repos/sqlalchemyMigrate-569.tar.gz"; + sha256 = "7775d9bf7e25a8270ac112d9b1d916a36691a73beb9a87a6473d005d3ee0f0bf"; + }; }