mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-06-06 13:12:47 +00:00
Create a transcoder crate
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{pkgs ? import <nixpkgs> {}}: let
|
||||
pwd = ./.;
|
||||
venvDir = "./scanner/.venv";
|
||||
pythonPkgs = ./scanner/requirements.txt;
|
||||
in
|
||||
@@ -13,18 +14,23 @@ in
|
||||
])
|
||||
python3
|
||||
python3Packages.pip
|
||||
cargo
|
||||
rustfmt
|
||||
rustc
|
||||
];
|
||||
|
||||
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
|
||||
|
||||
shellHook = ''
|
||||
# Install python modules
|
||||
SOURCE_DATE_EPOCH=$(date +%s)
|
||||
if [ ! -d "${venvDir}" ]; then
|
||||
${pkgs.python3}/bin/python3 -m venv ${venvDir}
|
||||
source ${venvDir}/bin/activate
|
||||
export PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||
pip install -r ${pythonPkgs} >&2
|
||||
else
|
||||
source ${venvDir}/bin/activate
|
||||
fi
|
||||
# Install python modules
|
||||
SOURCE_DATE_EPOCH=$(date +%s)
|
||||
if [ ! -d "${venvDir}" ]; then
|
||||
${pkgs.python3}/bin/python3 -m venv ${pwd}/${venvDir}
|
||||
source ${venvDir}/bin/activate
|
||||
export PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||
pip install -r ${pythonPkgs} >&2
|
||||
else
|
||||
source ${venvDir}/bin/activate
|
||||
fi
|
||||
'';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user