diff --git a/home/desktop.nix b/home/desktop.nix index 961c87f..cb116a2 100644 --- a/home/desktop.nix +++ b/home/desktop.nix @@ -17,9 +17,10 @@ gradle htop hyfetch + imagemagick # telnet inetutils - imagemagick + ipsw jadx jdk21 jq diff --git a/pkgs/default.nix b/pkgs/default.nix index e3403d7..83be1a5 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,5 +1,6 @@ self: super: { + ipsw = super.callPackage ./ipsw.nix { }; monaco-powerline = super.callPackage ./monaco-powerline/default.nix { }; swiftformat = super.callPackage ./swiftformat.nix { }; } diff --git a/pkgs/ipsw.nix b/pkgs/ipsw.nix new file mode 100644 index 0000000..72b5e2e --- /dev/null +++ b/pkgs/ipsw.nix @@ -0,0 +1,38 @@ +{ buildGo123Module, lib, fetchFromGitHub, pkgs }: + +# As of writing, this requires Go 1.23. +# `buildGoModule` currently uses Go 1.22. +buildGo123Module rec { + pname = "ipsw"; + version = "3.1.542"; + + src = fetchFromGitHub { + owner = "blacktop"; + repo = "ipsw"; + rev = "v${version}"; + hash = "sha256-s5clUOfJdLhbOtImkCNyPfBaIityJDXIkUlP4QfaLVE="; + }; + + vendorHash = "sha256-frOgljG8YKfuzozKPt4SpMiRz3891bteu1WKiVXwz/4="; + + buildInputs = with pkgs; [ + unicorn + ]; + + # Only build the `ipsw` CLI tool. + # We do not need `ipswd`. + subPackages = [ + "cmd/ipsw" + ]; + + ldflags = [ + "-X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppVersion=v${version}" + # There's also `cmd.AppBuildCommit`, but this would be a hassle. + ]; + + meta = { + description = "Simple command-line snippet manager, written in Go"; + homepage = "https://github.com/blacktop/ipsw"; + license = lib.licenses.mit; + }; +}