Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- { pkgs ? (import <nixpkgs> {}) }:
- let
- python = import ./requirements.nix { inherit pkgs; };
- in pkgs.stdenv.mkDerivation {
- name = "todo-backend-flask";
- src = ./todo-backend-flask;
- buildInputs = [pkgs.makeWrapper];
- propagatedBuildInputs = builtins.attrValues python.packages;
- builder = "${pkgs.bash}/bin/bash";
- args = ["-c" ''
- source $stdenv/setup
- mkdir -p $out/{bin,src}
- cp -rv ${./.}/* $out/src/
- makeWrapper \
- ${python.packages.gunicorn}/bin/gunicorn \
- $out/bin/todo-server \
- --prefix PATH : ${./todo-backend-flask} \
- --add-flags todo:app
- ''];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement