after https://github.com/Mic92/nix-update/pull/120 and https://github.com/NixOS/nixpkgs/pull/207703, `attrPath` can now be omitted when using `nix-update-script`
41 lines
990 B
Nix
41 lines
990 B
Nix
{ lib, fetchFromGitHub, python3Packages, nix-update-script, gnupg }:
|
|
|
|
python3Packages.buildPythonApplication rec {
|
|
pname = "apt-offline";
|
|
version = "1.8.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "rickysarraf";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "RBf/QG0ewLS6gnQTBXi0I18z8QrxoBAqEXZ7dro9z5A=";
|
|
};
|
|
|
|
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 = nix-update-script { };
|
|
|
|
meta = with lib; {
|
|
homepage = "https://github.com/rickysarraf/apt-offline";
|
|
description = "Offline APT package manager";
|
|
license = licenses.gpl3;
|
|
maintainers = [ ];
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|