about summary refs log tree commit diff
path: root/pkgs/by-name/bu/buttermanager/package.nix
blob: 80c3dd4e3084ed9db1d33e3d889095be735753d0 (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
45
46
47
48
49
50
51
{ lib
, fetchFromGitHub
, python3Packages
, wrapGAppsHook3
, qt5
}:

python3Packages.buildPythonApplication rec {
  pname = "buttermanager";
  version = "2.5.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "egara";
    repo = "buttermanager";
    rev = version;
    hash = "sha256-MLYJt7OMYlTFk8FCAlZJ1RGlFFXKfeAthWGp4JN+PfY=";
  };

  propagatedBuildInputs = with python3Packages; [
    pyqt5
    pyyaml
    sip
    tkinter
  ];

  nativeBuildInputs = [
    wrapGAppsHook3
    qt5.wrapQtAppsHook
  ];

  dontWrapQtApps = true;
  dontWrapGApps = true;
  makeWrapperArgs = [ "\${qtWrapperArgs[@]}" "\${gappsWrapperArgs[@]}"];

  postInstall = ''
    substituteInPlace packaging/buttermanager.desktop \
      --replace-fail /opt/buttermanager/gui/buttermanager.svg buttermanager

    install -Dm444 packaging/buttermanager.desktop -t $out/share/applications
    install -Dm444 packaging/buttermanager.svg -t $out/share/icons/hicolor/scalable/apps
  '';

  meta = with lib; {
    description = "Btrfs tool for managing snapshots, balancing filesystems and upgrading the system safetly";
    homepage = "https://github.com/egara/buttermanager";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ t4ccer ];
    mainProgram = "buttermanager";
  };
}