about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/loxodo/default.nix
blob: 78d01af1f08b41f5833a5f0966054c5f4cc4a479 (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
{ lib, python3, fetchFromGitHub }:

python3.pkgs.buildPythonApplication {
  pname = "loxodo";
  version = "unstable-2021-02-08";

  src = fetchFromGitHub {
    owner = "sommer";
    repo = "loxodo";
    rev = "7add982135545817e9b3e2bbd0d27a2763866133";
    sha256 = "1cips4pvrqga8q1ibs23vjrf8dwan860x8jvjmc52h6qvvvv60yl";
  };

  patches = [ ./wxpython.patch ];

  propagatedBuildInputs = with python3.pkgs; [ six wxpython ];

  postInstall = ''
    mv $out/bin/loxodo.py $out/bin/loxodo
    mkdir -p $out/share/applications
    cat > $out/share/applications/loxodo.desktop <<EOF
    [Desktop Entry]
    Type=Application
    Exec=$out/bin/loxodo
    Icon=$out/lib/${python3.libPrefix}/site-packages/resources/loxodo-icon.png
    Name=Loxodo
    GenericName=Password Vault
    Categories=Application;Other;
    EOF
  '';

  doCheck = false;  # Tests are interactive.

  meta = with lib; {
    description = "A Password Safe V3 compatible password vault";
    homepage = "https://www.christoph-sommer.de/loxodo/";
    license = licenses.gpl2Plus;
    platforms = platforms.linux;
    maintainers = with maintainers; [ ];
  };
}