nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 nix-update-script,
5 rustPlatform,
6 versionCheckHook,
7 withLocaleSupport ? true,
8}:
9rustPlatform.buildRustPackage (finalAttrs: {
10 pname = "biff";
11 version = "0.1.1";
12
13 src = fetchFromGitHub {
14 owner = "BurntSushi";
15 repo = "biff";
16 tag = finalAttrs.version;
17 hash = "sha256-7KkzmaWbUHrLUd7lADJLPLSeE/RYJvVAEL+FcE5KIhY=";
18 };
19
20 buildFeatures = lib.optional withLocaleSupport "locale";
21
22 cargoHash = "sha256-pGY1KDcsBz5J/mf4c8zDVbivgzfimSy8ruNoa+Pn9p8=";
23
24 doInstallCheck = true;
25 nativeInstallCheckInputs = [ versionCheckHook ];
26
27 passthru.updateScript = nix-update-script { };
28
29 meta = {
30 description = "Command line tool for datetime arithmetic, parsing, formatting and more";
31 homepage = "https://github.com/BurntSushi/biff";
32 changelog = "https://github.com/BurntSushi/biff/blob/${finalAttrs.version}/CHANGELOG.md";
33 license = [
34 lib.licenses.mit
35 lib.licenses.unlicense
36 ];
37 maintainers = [ lib.maintainers.kpbaks ];
38 mainProgram = "biff";
39 platforms = lib.platforms.all;
40 };
41})