# -*- mode: snippet -*- # name: pythonpackage # key: pythonpackage # -- { lib, python3 }: python3.pkgs.buildPythonApplication rec { pname = "$1"; src = ./$1.py; version = "0.1.0"; format = "other"; buildInputs = [ python3 ]; propagatedBuildInputs = with python3.pkgs; [ $2 ]; dontUnpack = true; dontBuild = true; installPhase = '' mkdir -p $out/bin cp $src $out/bin/\${pname} ''; meta = with lib; { description = "$3."; license = with licenses; [ mit ]; platforms = platforms.unix; maintainers = with maintainers; [ fcuny ]; }; }