mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-23 06:03:40 +00:00
46 lines
1.1 KiB
Nix
46 lines
1.1 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, python3Packages
|
|
, gnupg
|
|
}:
|
|
|
|
let
|
|
pname = "apt-offline";
|
|
version = "1.8.5";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rickysarraf";
|
|
repo = "apt-offline";
|
|
rev = "v${version}";
|
|
hash = "sha256-KkJwQ9EpOSJK9PaM747l6Gqp8Z8SWvuo3TJ+Ry6d0l4=";
|
|
};
|
|
in
|
|
python3Packages.buildPythonApplication {
|
|
inherit pname version src;
|
|
|
|
postPatch = ''
|
|
substituteInPlace org.debian.apt.aptoffline.policy \
|
|
--replace /usr/bin/ "$out/bin"
|
|
|
|
substituteInPlace apt_offline_core/AptOfflineCoreLib.py \
|
|
--replace /usr/bin/gpgv "${lib.getBin gnupg}/bin/gpgv"
|
|
'';
|
|
|
|
postFixup = ''
|
|
rm "$out/bin/apt-offline-gui" "$out/bin/apt-offline-gui-pkexec"
|
|
'';
|
|
|
|
doCheck = false; # API incompatibilities, maybe?
|
|
|
|
pythonImportsCheck = [ "apt_offline_core" ];
|
|
|
|
meta = {
|
|
homepage = "https://github.com/rickysarraf/apt-offline";
|
|
description = "Offline APT package manager";
|
|
license = with lib.licenses; [ gpl3Plus ];
|
|
mainProgram = "apt-offline";
|
|
maintainers = with lib.maintainers; [ AndersonTorres ];
|
|
};
|
|
}
|
|
# TODO: verify GUI and pkexec
|