apt-offline: adopt and refactor

- remove rec
- remove nested with
This commit is contained in:
Anderson Torres 2023-11-13 18:56:31 -03:00
parent 18c71e751b
commit 1751247c95
2 changed files with 16 additions and 13 deletions

View file

@ -1,15 +1,22 @@
{ lib, fetchFromGitHub, python3Packages, nix-update-script, gnupg }: { lib
, fetchFromGitHub
, python3Packages
, gnupg
}:
python3Packages.buildPythonApplication rec { let
pname = "apt-offline"; pname = "apt-offline";
version = "1.8.4"; version = "1.8.4";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "rickysarraf"; owner = "rickysarraf";
repo = pname; repo = "apt-offline";
rev = "v${version}"; rev = "v${version}";
sha256 = "RBf/QG0ewLS6gnQTBXi0I18z8QrxoBAqEXZ7dro9z5A="; hash = "sha256-RBf/QG0ewLS6gnQTBXi0I18z8QrxoBAqEXZ7dro9z5A=";
}; };
in
python3Packages.buildPythonApplication {
inherit pname version src;
postPatch = '' postPatch = ''
substituteInPlace org.debian.apt.aptoffline.policy \ substituteInPlace org.debian.apt.aptoffline.policy \
@ -24,17 +31,15 @@ python3Packages.buildPythonApplication rec {
rm "$out/bin/apt-offline-gui-pkexec" rm "$out/bin/apt-offline-gui-pkexec"
''; '';
doCheck = false; doCheck = false; # API incompatibilities, maybe?
pythonImportsCheck = [ "apt_offline_core" ]; pythonImportsCheck = [ "apt_offline_core" ];
passthru.updateScript = nix-update-script { }; meta = {
meta = with lib; {
homepage = "https://github.com/rickysarraf/apt-offline"; homepage = "https://github.com/rickysarraf/apt-offline";
description = "Offline APT package manager"; description = "Offline APT package manager";
license = licenses.gpl3; license = with lib.licenses; [ gpl3Plus ];
maintainers = [ ]; mainProgram = "apt-offline";
platforms = platforms.linux; maintainers = with lib.maintainers; [ AndersonTorres ];
}; };
} }

View file

@ -3252,8 +3252,6 @@ with pkgs;
apt-cacher-ng = callPackage ../servers/http/apt-cacher-ng { }; apt-cacher-ng = callPackage ../servers/http/apt-cacher-ng { };
apt-offline = callPackage ../tools/misc/apt-offline { };
aptly = callPackage ../tools/misc/aptly { }; aptly = callPackage ../tools/misc/aptly { };
ArchiSteamFarm = callPackage ../applications/misc/ArchiSteamFarm { }; ArchiSteamFarm = callPackage ../applications/misc/ArchiSteamFarm { };