Commit 1751247c authored by Anderson Torres's avatar Anderson Torres
Browse files

apt-offline: adopt and refactor

- remove rec
- remove nested with
parent 18c71e75
Loading
Loading
Loading
Loading
+16 −11
Original line number Diff line number Diff line
{ lib, fetchFromGitHub, python3Packages, nix-update-script, gnupg }:
{ lib
, fetchFromGitHub
, python3Packages
, gnupg
}:

python3Packages.buildPythonApplication rec {
let
  pname = "apt-offline";
  version = "1.8.4";

  src = fetchFromGitHub {
    owner = "rickysarraf";
    repo = pname;
    repo = "apt-offline";
    rev = "v${version}";
    sha256 = "RBf/QG0ewLS6gnQTBXi0I18z8QrxoBAqEXZ7dro9z5A=";
    hash = "sha256-RBf/QG0ewLS6gnQTBXi0I18z8QrxoBAqEXZ7dro9z5A=";
  };
in
python3Packages.buildPythonApplication {
  inherit pname version src;

  postPatch = ''
    substituteInPlace org.debian.apt.aptoffline.policy \
@@ -24,17 +31,15 @@ python3Packages.buildPythonApplication rec {
    rm "$out/bin/apt-offline-gui-pkexec"
  '';

  doCheck = false;
  doCheck = false; # API incompatibilities, maybe?

  pythonImportsCheck = [ "apt_offline_core" ];

  passthru.updateScript = nix-update-script { };

  meta = with lib; {
  meta = {
    homepage = "https://github.com/rickysarraf/apt-offline";
    description = "Offline APT package manager";
    license = licenses.gpl3;
    maintainers = [ ];
    platforms = platforms.linux;
    license = with lib.licenses; [ gpl3Plus ];
    mainProgram = "apt-offline";
    maintainers = with lib.maintainers; [ AndersonTorres ];
  };
}
+0 −2
Original line number Diff line number Diff line
@@ -3252,8 +3252,6 @@ with pkgs;
  apt-cacher-ng = callPackage ../servers/http/apt-cacher-ng { };
  apt-offline = callPackage ../tools/misc/apt-offline { };
  aptly = callPackage ../tools/misc/aptly { };
  ArchiSteamFarm = callPackage ../applications/misc/ArchiSteamFarm { };