1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 pkg-config,
6 libxkbcommon,
7 openssl,
8 stdenv,
9 wayland,
10}:
11
12rustPlatform.buildRustPackage rec {
13 pname = "gitnr";
14 version = "0.2.2";
15
16 src = fetchFromGitHub {
17 owner = "reemus-dev";
18 repo = "gitnr";
19 rev = "v${version}";
20 hash = "sha256-9vx+bGfYuJuafZUY2ZT4SAgrNcSXuMe1kHH/lrpItvM=";
21 };
22
23 cargoHash = "sha256-DlYV92ZbkeUieVmyaxVuCslkwAgWrULu4HerLFXZZtE=";
24
25 nativeBuildInputs = [
26 pkg-config
27 ];
28
29 buildInputs = [
30 openssl
31 ]
32 ++ lib.optionals stdenv.hostPlatform.isLinux [
33 libxkbcommon
34 wayland
35 ];
36
37 # requires internet access
38 doCheck = false;
39
40 meta = with lib; {
41 description = "Create `.gitignore` files using one or more templates from TopTal, GitHub or your own collection";
42 homepage = "https://github.com/reemus-dev/gitnr";
43 changelog = "https://github.com/reemus-dev/gitnr/blob/${src.rev}/CHANGELOG.md";
44 license = licenses.mit;
45 maintainers = with maintainers; [
46 figsoda
47 matthiasbeyer
48 ];
49 mainProgram = "gitnr";
50 };
51}