depot/third_party/nixpkgs/pkgs/tools/misc/apt-offline/default.nix
Default email 81047829ea Project import generated by Copybara.
GitOrigin-RevId: 48d63e924a2666baf37f4f14a18f19347fbd54a2
2022-02-10 15:34:41 -05:00

42 lines
1.1 KiB
Nix

{ lib, fetchFromGitHub, python3Packages, unstableGitUpdater, gnupg }:
python3Packages.buildPythonApplication rec {
pname = "apt-offline";
version = "unstable-2022-02-06";
src = fetchFromGitHub {
owner = "rickysarraf";
repo = pname;
rev = "2b9929773ff2b6e53d30c50c31fb3a1605631f5f";
sha256 = "mf2NM39ql6KR/YTWPYNyVe+bvWmUFYfxt5BGmU5WFpQ=";
};
postPatch = ''
substituteInPlace org.debian.apt.aptoffline.policy \
--replace /usr/bin/ "$out/bin"
substituteInPlace apt_offline_core/AptOfflineCoreLib.py \
--replace /usr/bin/gpgv "${gnupg}/bin/gpgv"
'';
preFixup = ''
rm "$out/bin/apt-offline-gui"
rm "$out/bin/apt-offline-gui-pkexec"
'';
doCheck = false;
pythonimportsCheck = [ "apt-offline" ];
passthru.updateScript = unstableGitUpdater {
url = "https://github.com/rickysarraf/apt-offline.git";
};
meta = with lib; {
homepage = "https://github.com/rickysarraf/apt-offline";
description = "Offline APT package manager";
license = licenses.gpl3;
maintainers = [ ];
platforms = platforms.linux;
};
}