mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 04:33:57 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
44 lines
1.1 KiB
Nix
44 lines
1.1 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, stdenv
|
|
, darwin
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "sagoin";
|
|
version = "0.2.4";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "figsoda";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
hash = "sha256-zXYjR9ZFNX2guUSeMN/G77oBIlW3AowFWA4gwID2jQs=";
|
|
};
|
|
|
|
cargoHash = "sha256-NMv48gv3RUIjBRD2XuOhmS32d+MjZ/tP/ZhpRuyulgE=";
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
darwin.apple_sdk.frameworks.CoreServices
|
|
];
|
|
|
|
postInstall = ''
|
|
installManPage artifacts/sagoin.1
|
|
installShellCompletion artifacts/sagoin.{bash,fish} --zsh artifacts/_sagoin
|
|
'';
|
|
|
|
GEN_ARTIFACTS = "artifacts";
|
|
|
|
meta = with lib; {
|
|
description = "Command-line submission tool for the UMD CS Submit Server";
|
|
homepage = "https://github.com/figsoda/sagoin";
|
|
changelog = "https://github.com/figsoda/sagoin/blob/v${version}/CHANGELOG.md";
|
|
license = licenses.agpl3Plus;
|
|
maintainers = with maintainers; [ figsoda ];
|
|
mainProgram = "sagoin";
|
|
};
|
|
}
|