evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / by-name / ap / apt-offline / package.nix
blobba34dec6c0f8780e9d76a7bd25784c7fdfea9673
1 { lib
2 , fetchFromGitHub
3 , python3Packages
4 , gnupg
5 , installShellFiles
6 }:
8 let
9   pname = "apt-offline";
10   version = "1.8.5";
12   src = fetchFromGitHub {
13     owner = "rickysarraf";
14     repo = "apt-offline";
15     rev = "v${version}";
16     hash = "sha256-KkJwQ9EpOSJK9PaM747l6Gqp8Z8SWvuo3TJ+Ry6d0l4=";
17   };
19 python3Packages.buildPythonApplication {
20   inherit pname version src;
22   nativeBuildInputs = [ installShellFiles ];
24   postPatch = ''
25     substituteInPlace org.debian.apt.aptoffline.policy \
26       --replace-fail /usr/bin/ "$out/bin"
28     substituteInPlace apt_offline_core/AptOfflineCoreLib.py \
29       --replace-fail /usr/bin/gpgv "${lib.getBin gnupg}/bin/gpgv"
30   '';
32   postInstall = ''
33     installManPage apt-offline.8
34   '';
36   postFixup = ''
37     rm "$out/bin/apt-offline-gui" "$out/bin/apt-offline-gui-pkexec"
38   '';
40   doCheck = false; # API incompatibilities, maybe?
42   pythonImportsCheck = [ "apt_offline_core" ];
44   outputs = [ "out" "man" ];
46   meta = {
47     homepage = "https://github.com/rickysarraf/apt-offline";
48     description = "Offline APT package manager";
49     license = with lib.licenses; [ gpl3Plus ];
50     mainProgram = "apt-offline";
51     maintainers = with lib.maintainers; [ AndersonTorres ];
52   };
54 # TODO: verify GUI and pkexec