{ 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.568"; src = fetchFromGitHub { owner = "blacktop"; repo = "ipsw"; rev = "v${version}"; hash = "sha256-U10yPpB48utCYUNLnPLuVl+77bOwnrredEp36pDq72Y="; }; vendorHash = "sha256-3QBSuuBp3K1q91b912gIhdXyGlhCLbpHEZeYSi6qDcI="; 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; }; }