1{
2 lib,
3 stdenv,
4 fetchurl,
5
6 # nativeBuildInputs
7 zstd,
8 pkg-config,
9 jq,
10 cargo,
11 rustc,
12 rustPlatform,
13
14 # buildInputs
15 libgit2,
16}:
17
18stdenv.mkDerivation (finalAttrs: {
19 pname = "git-warp-time";
20 version = "0.8.5";
21
22 src = fetchurl {
23 url = "https://github.com/alerque/git-warp-time/releases/download/v${finalAttrs.version}/git-warp-time-${finalAttrs.version}.tar.zst";
24 hash = "sha256-bt94Y1EIcLzz1v2Nwyde63y6FWD+iaFkoEYoQpWVWGY=";
25 };
26
27 cargoDeps = rustPlatform.fetchCargoVendor {
28 inherit (finalAttrs) pname version src;
29 dontConfigure = true;
30 nativeBuildInputs = [ zstd ];
31 hash = "sha256-FNt9spOFOSbOgpZnxLl3aIvU6lnIJHaVMoAKxl4lzhU=";
32 };
33
34 nativeBuildInputs = [
35 zstd
36 pkg-config
37 jq
38 cargo
39 rustc
40 rustPlatform.cargoSetupHook
41 ];
42
43 buildInputs = [
44 libgit2
45 ];
46
47 env = {
48 LIBGIT2_NO_VENDOR = "1";
49 };
50
51 outputs = [
52 "out"
53 "doc"
54 "man"
55 "dev"
56 ];
57
58 enableParallelBuilding = true;
59
60 meta = {
61 description = "Utility to reset filesystem timestamps based on Git history";
62 longDescription = ''
63 A CLI utility that resets the timestamps of files in a Git repository
64 working directory to the exact timestamp of the last commit which
65 modified each file.
66 '';
67 homepage = "https://github.com/alerque/git-warp-time";
68 changelog = "https://github.com/alerque/git-warp-time/raw/v${finalAttrs.version}/CHANGELOG.md";
69 platforms = lib.platforms.unix;
70 maintainers = with lib.maintainers; [
71 alerque
72 ];
73 license = lib.licenses.gpl3Only;
74 mainProgram = "git-warp-time";
75 };
76})