Implement audio file compression
This commit is contained in:
parent
2f0adc8308
commit
ca17e44687
6 changed files with 183 additions and 23 deletions
48
shell.nix
48
shell.nix
|
|
@ -1,16 +1,26 @@
|
|||
{ system ? "x86_64-linux", pkgs ? import <nixpkgs> { inherit system; }, dev ? true, }:
|
||||
{
|
||||
system ? "x86_64-linux",
|
||||
pkgs ? import <nixpkgs> { inherit system; },
|
||||
dev ? true,
|
||||
}:
|
||||
|
||||
let
|
||||
pyCurrent = pkgs.python311;
|
||||
poetryExtras = if dev then ["dev"] else [];
|
||||
poetryExtras = if dev then [ "dev" ] else [ ];
|
||||
poetryInstallExtras = (
|
||||
if poetryExtras == [] then ""
|
||||
else pkgs.lib.concatStrings [ " --with=" (pkgs.lib.concatStringsSep "," poetryExtras) ]
|
||||
if poetryExtras == [ ] then
|
||||
""
|
||||
else
|
||||
pkgs.lib.concatStrings [
|
||||
" --with="
|
||||
(pkgs.lib.concatStringsSep "," poetryExtras)
|
||||
]
|
||||
);
|
||||
packages = [
|
||||
pyCurrent
|
||||
pkgs.ffmpeg_5-headless
|
||||
#(pyCurrent (ps: with ps; [ ffmpeg-python ]))
|
||||
pkgs.zsh
|
||||
(pkgs.poetry.withPlugins(ps: with ps; [poetry-plugin-up]))
|
||||
(pkgs.poetry.withPlugins (ps: with ps; [ poetry-plugin-up ]))
|
||||
];
|
||||
|
||||
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
|
||||
|
|
@ -26,16 +36,16 @@ poetryExtras = if dev then ["dev"] else [];
|
|||
# Use python from path, so you can use a different version to the one bundled with poetry
|
||||
POETRY_VIRTUALENVS_PREFER_ACTIVE_PYTHON = "true";
|
||||
in
|
||||
pkgs.mkShell {
|
||||
buildInputs = packages;
|
||||
shellHook = ''
|
||||
export SHELL=${pkgs.zsh}
|
||||
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
|
||||
export POETRY_VIRTUALENVS_IN_PROJECT="${POETRY_VIRTUALENVS_IN_PROJECT}"
|
||||
export POETRY_VIRTUALENVS_PATH="${POETRY_VIRTUALENVS_PATH}"
|
||||
export POETRY_VIRTUALENVS_PREFER_ACTIVE_PYTHON="${POETRY_VIRTUALENVS_PREFER_ACTIVE_PYTHON}"
|
||||
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
|
||||
poetry env use "${pyCurrent}/bin/python"
|
||||
poetry install -vv --sync${poetryInstallExtras}
|
||||
'';
|
||||
}
|
||||
pkgs.mkShell {
|
||||
buildInputs = packages;
|
||||
shellHook = ''
|
||||
export SHELL=${pkgs.zsh}
|
||||
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}"
|
||||
export POETRY_VIRTUALENVS_IN_PROJECT="${POETRY_VIRTUALENVS_IN_PROJECT}"
|
||||
export POETRY_VIRTUALENVS_PATH="${POETRY_VIRTUALENVS_PATH}"
|
||||
export POETRY_VIRTUALENVS_PREFER_ACTIVE_PYTHON="${POETRY_VIRTUALENVS_PREFER_ACTIVE_PYTHON}"
|
||||
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
|
||||
poetry env use "${pyCurrent}/bin/python"
|
||||
poetry install -vv --sync${poetryInstallExtras}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue