Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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.0";
12
13 src = fetchFromGitHub {
14 owner = "BurntSushi";
15 repo = "biff";
16 tag = finalAttrs.version;
17 hash = "sha256-SkrPn6reekoJkKsMH2pB1FtYwObUcmA2W0wVvkbzTEE=";
18 };
19
20 buildFeatures = lib.optional withLocaleSupport "locale";
21
22 cargoHash = "sha256-x8nieQ1X5BLDTjYh67ApWDoS6chLy2DYAehgnPnhrVk=";
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})