about summary refs log tree commit diff
path: root/pkgs/applications/misc/ipatool
diff options
context:
space:
mode:
authorGaƫl Reyrol <me@gaelreyrol.dev>2023-07-15 16:57:11 +0200
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-07-16 20:39:32 -0300
commit8ced735fec82d896c1262eb5ee850572e4a7f38f (patch)
treee96328e62ae3d40a796d301895e23affcc20f839 /pkgs/applications/misc/ipatool
parentd6479a49c74bf7d8b6f551c1c3ed7cbeb6b55d6c (diff)
ipatool: init at 2.1.3
Diffstat (limited to 'pkgs/applications/misc/ipatool')
-rw-r--r--pkgs/applications/misc/ipatool/default.nix52
1 files changed, 52 insertions, 0 deletions
diff --git a/pkgs/applications/misc/ipatool/default.nix b/pkgs/applications/misc/ipatool/default.nix
new file mode 100644
index 0000000000000..95735294deabb
--- /dev/null
+++ b/pkgs/applications/misc/ipatool/default.nix
@@ -0,0 +1,52 @@
+{ lib
+, buildGoModule
+, fetchFromGitHub
+, nix-update-script
+, testers
+, ipatool
+}:
+
+buildGoModule rec {
+  pname = "ipatool";
+  version = "2.1.3";
+
+  src = fetchFromGitHub {
+    owner = "majd";
+    repo = "ipatool";
+    rev = "v${version}";
+    hash = "sha256-kIFKVIhH+Vjt05XzR5jNwYQokNLSckdiWJ97A03Lgqc=";
+  };
+
+  vendorHash = "sha256-ZTz3eW/rs3bV16Ugd4kUOW7NaXzBa5c9qTIqRCanPRU=";
+
+  ldflags = [
+    "-s"
+    "-w"
+    "-X github.com/majd/ipatool/v2/cmd.version=${version}"
+  ];
+
+  # go generate ./... fails because of a missing module: github.com/golang/mock/mockgen
+  # which is required to run the tests, check if next release fixes it.
+  # preCheck = ''
+  #   go generate ./...
+  # '';
+  doCheck = false;
+
+  passthru = {
+    updateScript = nix-update-script { };
+    tests.version = testers.testVersion {
+      inherit version;
+      package = ipatool;
+      command = "ipatool --version";
+    };
+  };
+
+  meta = with lib; {
+    description = "Command-line tool that allows searching and downloading app packages (known as ipa files) from the iOS App Store";
+    homepage = "https://github.com/majd/ipatool";
+    changelog = "https://github.com/majd/ipatool/blob/${src.rev}/CHANGELOG.md";
+    license = licenses.mit;
+    maintainers = with maintainers; [ gaelreyrol ];
+    mainProgram = "ipatool";
+  };
+}