1{ lib
2, fetchFromGitHub
3, rustPlatform
4}:
5
6rustPlatform.buildRustPackage rec {
7 pname = "licensor";
8 version = "unstable-2021-02-03";
9
10 src = fetchFromGitHub {
11 owner = "raftario";
12 repo = pname;
13 rev = "1897882a708ec6ed65a9569ae0e07d6ea576c652";
14 sha256 = "0x0lkfrj7jka0p6nx6i9syz0bnzya5z9np9cw09zm1c9njv9mm32";
15 };
16
17 cargoSha256 = "1h66d1brx441bg7vzbqdish4avgmc6h7rrkw2qf1siwmplwqqhw0";
18
19 # https://github.com/raftario/licensor/issues/67
20 postPatch = ''
21 sed "/Copyright (c) 2021/s/2021/$(date +%Y)/" -i tests/integration.rs
22 '';
23
24 meta = with lib; {
25 description = "Write licenses to stdout";
26 homepage = "https://github.com/raftario/licensor";
27 license = licenses.mit;
28 maintainers = with maintainers; [ Br1ght0ne ];
29 mainProgram = "licensor";
30 };
31}