2022-10-30 15:09:59 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, installShellFiles
|
|
|
|
, stdenv
|
|
|
|
, darwin
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "sagoin";
|
2022-11-21 17:40:18 +00:00
|
|
|
version = "0.2.0";
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "figsoda";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-11-21 17:40:18 +00:00
|
|
|
sha256 = "sha256-BCsNsBD+ZkxhIy1yC+N0AqbEsQ2ElfWLtnBOG+0hHXk=";
|
2022-10-30 15:09:59 +00:00
|
|
|
};
|
|
|
|
|
2022-11-21 17:40:18 +00:00
|
|
|
cargoSha256 = "sha256-B8P92utlmZlxNfzBidNUaGw7BhgkOPwD0yahtKZ2yto=";
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.Security
|
|
|
|
];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installManPage artifacts/sagoin.1
|
|
|
|
installShellCompletion artifacts/sagoin.{bash,fish} --zsh artifacts/_sagoin
|
|
|
|
'';
|
|
|
|
|
|
|
|
GEN_ARTIFACTS = "artifacts";
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-11-21 17:40:18 +00:00
|
|
|
description = "A command-line submission tool for the UMD CS Submit Server";
|
2022-10-30 15:09:59 +00:00
|
|
|
homepage = "https://github.com/figsoda/sagoin";
|
|
|
|
changelog = "https://github.com/figsoda/sagoin/blob/v${version}/CHANGELOG.md";
|
|
|
|
license = licenses.agpl3Plus;
|
|
|
|
maintainers = with maintainers; [ figsoda ];
|
|
|
|
};
|
|
|
|
}
|