1{ lib
2, fetchFromGitHub
3, stdenvNoCC
4, nss
5, wrapPython
6, nix-update-script
7}:
8
9stdenvNoCC.mkDerivation rec {
10 pname = "firefox_decrypt";
11 version = "unstable-2022-12-21";
12
13 src = fetchFromGitHub {
14 owner = "unode";
15 repo = pname;
16 rev = "84bb368cc2f8d2055a8374ab1a40c403e0486859";
17 sha256 = "sha256-dyQTf6fgsQEmp++DeXl85nvyezm0Lq9onyfIdhQoGgI=";
18 };
19
20 nativeBuildInputs = [ wrapPython ];
21
22 buildInputs = [ nss ];
23
24 installPhase = ''
25 runHook preInstall
26
27 install -Dm 0755 firefox_decrypt.py "$out/bin/firefox_decrypt"
28
29 runHook postInstall
30 '';
31
32 makeWrapperArgs = [ "--prefix" "LD_LIBRARY_PATH" ":" (lib.makeLibraryPath [ nss ]) ];
33
34 postFixup = ''
35 wrapPythonPrograms
36 '';
37
38 passthru.updateScript = nix-update-script {
39 extraArgs = [ "--version=branch" ];
40 };
41
42 meta = with lib; {
43 homepage = "https://github.com/unode/firefox_decrypt";
44 description = "A tool to extract passwords from profiles of Mozilla Firefox and derivates";
45 license = licenses.gpl3Plus;
46 maintainers = with maintainers; [ schnusch ];
47 };
48}