about summary refs log tree commit diff
path: root/pkgs/by-name/ap
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/by-name/ap')
-rw-r--r--pkgs/by-name/ap/apt-offline/package.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/by-name/ap/apt-offline/package.nix b/pkgs/by-name/ap/apt-offline/package.nix
new file mode 100644
index 000000000000..4eef07f030c5
--- /dev/null
+++ b/pkgs/by-name/ap/apt-offline/package.nix
@@ -0,0 +1,45 @@
+{ lib
+, fetchFromGitHub
+, python3Packages
+, gnupg
+}:
+
+let
+  pname = "apt-offline";
+  version = "1.8.4";
+
+  src = fetchFromGitHub {
+    owner = "rickysarraf";
+    repo = "apt-offline";
+    rev = "v${version}";
+    hash = "sha256-RBf/QG0ewLS6gnQTBXi0I18z8QrxoBAqEXZ7dro9z5A=";
+  };
+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 "${gnupg}/bin/gpgv"
+  '';
+
+  preFixup = ''
+    rm "$out/bin/apt-offline-gui"
+    rm "$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 ];
+  };
+}