18 lines
277 B
Nix
18 lines
277 B
Nix
{pkgs, ...}:
|
|
pkgs.writeShellApplication {
|
|
name = "convertMkv";
|
|
|
|
runtimeInputs = with pkgs; [
|
|
ffmpeg-full
|
|
];
|
|
|
|
text = ''
|
|
extension="$1"
|
|
file="$2"
|
|
|
|
new_file="''${file%."$extension"}.mkv"
|
|
|
|
ffmpeg -i "$file" -c copy "$new_file" &&
|
|
rm "$file"
|
|
'';
|
|
}
|