nixpkgs/pkgs/by-name/ia/iamb/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
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.
2024-11-09 20:04:51 +08:00

42 lines
992 B
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, installShellFiles
, darwin
, stdenv
}:
rustPlatform.buildRustPackage rec {
pname = "iamb";
version = "0.0.10";
src = fetchFromGitHub {
owner = "ulyssa";
repo = "iamb";
rev = "v${version}";
hash = "sha256-cjBSWUBgfwdLnpneJ5XW2TdOFkNc+Rc/wyUp9arZzwg=";
};
cargoHash = "sha256-a5y8nNFixOxJPNDOzvFFRqVrY2jsirCud2ZJJ8OvRhQ=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.AppKit
darwin.apple_sdk.frameworks.Cocoa
];
postInstall = ''
OUT_DIR=$releaseDir/build/iamb-*/out
installManPage $OUT_DIR/iamb.{1,5}
'';
meta = with lib; {
description = "Matrix client for Vim addicts";
mainProgram = "iamb";
homepage = "https://github.com/ulyssa/iamb";
changelog = "https://github.com/ulyssa/iamb/releases/tag/${src.rev}";
license = licenses.asl20;
maintainers = with maintainers; [ meain ];
};
}