Created
August 26, 2013 17:40
-
-
Save anonymous/6344275 to your computer and use it in GitHub Desktop.
deform2demo.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
let | |
deformdemo = with pkgs.python27Packages; buildPythonPackage rec { | |
rev = "f81bddf56d683309afc6498ef66ad0720a8f33a1"; | |
name = "deformdemo-${rev}"; | |
src = fetchgit { | |
url = "https://github.com/Pylons/deformdemo.git"; | |
inherit rev; | |
}; | |
# TODO: remove | |
doCheck = false; | |
configurePhase = '' | |
substituteInPlace setup.py --replace "'lingua'," "" | |
echo "graft deformdemo" >> MANIFEST.in | |
''; | |
propagatedBuildInputs = [ | |
deform2 | |
pyramid | |
pygments | |
Babel | |
waitress | |
]; | |
postInstall = '' | |
cp demo.ini $out/ | |
mkdir -p $out/bin | |
ln -s ${pyramid}/bin/pserve $out/bin | |
wrapProgram "$out/bin/pserve" \ | |
--suffix PYTHONPATH : "$out/lib/python2.7/site-packages" | |
''; | |
meta = with stdenv.lib; { | |
maintainers = [ maintainers.iElectric ]; | |
}; | |
}; | |
deform2 = with pkgs.python27Packages; buildPythonPackage rec { | |
rev = "48667ed79c0aad1445e400a30af68251d754870e"; | |
name = "deform-2.0dev"; | |
src = fetchgit { | |
url = "https://github.com/Pylons/deform.git"; | |
inherit rev; | |
}; | |
configurePhase = '' | |
echo "graft deform" >> MANIFEST.in | |
''; | |
# TODO: remove | |
doCheck = false; | |
propagatedBuildInputs = [ | |
beautifulsoup4 | |
peppercorn | |
colander | |
translationstring | |
chameleon | |
zope_deprecation | |
coverage | |
nose | |
]; | |
meta = with stdenv.lib; { | |
maintainers = [ maintainers.iElectric ]; | |
}; | |
}; | |
in { | |
systemd.services.deform2demo = { | |
after = [ "network.target" ]; | |
description = "Deform2demo web app"; | |
wantedBy = [ "multi-user.target" ]; | |
path = [ deformdemo ]; | |
serviceConfig.ExecStart = "${deformdemo}/bin/pserve ${deformdemo}/demo.ini"; | |
}; | |
environment.systemPackages = [ deformdemo ]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment