Skip to content

Instantly share code, notes, and snippets.

@adisbladis
Created October 28, 2018 21:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adisbladis/165840f05d83a71e3d6d8f63553cedd8 to your computer and use it in GitHub Desktop.
Save adisbladis/165840f05d83a71e3d6d8f63553cedd8 to your computer and use it in GitHub Desktop.
Dirty nixpkgs python
with import <nixpkgs> {};
mkShell {
buildInputs = [
(python3.withPackages(ps: [
ps.nixpkgs
]))
];
}
#!/usr/bin/env python
from nixpkgs.cherrypy import cherrypy
if __name__ == '__main__':
class HelloWorld(object):
def index(self):
return "Hello World!"
index.exposed = True
cherrypy.quickstart(HelloWorld())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment