uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
37
pkgs/servers/mlflow-server/default.nix
Normal file
37
pkgs/servers/mlflow-server/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{lib, python3, writeText}:
|
||||
|
||||
let
|
||||
py = python3.pkgs;
|
||||
in
|
||||
py.toPythonApplication
|
||||
(py.mlflow.overridePythonAttrs(old: rec {
|
||||
pname = "mlflow-server";
|
||||
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [
|
||||
py.boto3
|
||||
py.mysqlclient
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace mlflow/utils/process.py --replace \
|
||||
"child = subprocess.Popen(cmd, env=cmd_env, cwd=cwd, universal_newlines=True," \
|
||||
"cmd[0]='$out/bin/gunicornMlflow'; child = subprocess.Popen(cmd, env=cmd_env, cwd=cwd, universal_newlines=True,"
|
||||
'';
|
||||
|
||||
gunicornScript = writeText "gunicornMlflow"
|
||||
''
|
||||
#!/usr/bin/env python
|
||||
import re
|
||||
import sys
|
||||
from gunicorn.app.wsgiapp import run
|
||||
if __name__ == '__main__':
|
||||
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', ''', sys.argv[0])
|
||||
sys.exit(run())
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
gpath=$out/bin/gunicornMlflow
|
||||
cp ${gunicornScript} $gpath
|
||||
chmod 555 $gpath
|
||||
'';
|
||||
}))
|
||||
Loading…
Add table
Add a link
Reference in a new issue