Skip to content

Instantly share code, notes, and snippets.

/deform2demo.nix.txt
Created Aug 26, 2013

Embed
What would you like to do?
deform2demo.nix
{ 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
You can’t perform that action at this time.