dotfiles/pkgs/ipsw.nix

38 lines
917 B
Nix

{ buildGo124Module, lib, fetchFromGitHub, pkgs }:
# As of writing, this requires Go 1.24.
# `buildGoModule` currently uses Go 1.23.
buildGo124Module rec {
pname = "ipsw";
version = "3.1.573";
src = fetchFromGitHub {
owner = "blacktop";
repo = "ipsw";
rev = "v${version}";
hash = "sha256-PUfWz6nyUH97Yrqy4UD5gBDNpfEFR6ure2OyGwXGmEQ=";
};
vendorHash = "sha256-dYWBc1xVvq9Olh/IVC53q+YX1A0+8aHUs2R74+/dInI=";
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;
};
}