about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/un/unsilence/package.nix
blob: c82fe04616b692290646f198f96ace28d134e49f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
{ lib
, fetchFromGitHub
, python3Packages
, ffmpeg
,
}:
python3Packages.buildPythonPackage rec {
  pname = "unsilence";
  version = "1.0.9";

  src = fetchFromGitHub {
    owner = "lagmoellertim";
    repo = "unsilence";
    rev = version;
    sha256 = "sha256-M4Ek1JZwtr7vIg14aTa8h4otIZnPQfKNH4pZE4GpiBQ=";
  };

  nativeBuildInputs = with python3Packages; [
    rich
    pythonRelaxDepsHook
  ];

  propagatedBuildInputs = [
    python3Packages.rich
    python3Packages.setuptools # imports pkg_resources.parse_version
  ];

  makeWrapperArgs = [
    "--suffix PATH : ${lib.makeBinPath [ ffmpeg ]}"
  ];

  doCheck = false;
  pythonImportsCheck = [ "unsilence" ];

  pythonRelaxDeps = [ "rich" ];

  meta = with lib; {
    homepage = "https://github.com/lagmoellertim/unsilence";
    description = "Console Interface and Library to remove silent parts of a media file";
    mainProgram = "unsilence";
    license = licenses.mit;
    maintainers = with maintainers; [ esau79p ];
  };
}