zaphyra's git: nixfiles

zaphyra's nixfiles

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
{
  lib,
  rustPlatform,
  fetchFromGitHub,
  pkg-config,
  wrapGAppsHook4,
  gtk4,
  gtk4-layer-shell,
  ...
}:

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "nirimap";
  version = "0.2.0";
  rev = "v${finalAttrs.version}";
  srcHash = "sha256-4HnmIc9FDXgPfbJdhjuVenc2R/wZ9ULTi6QaTskO1/s=";
  cargoHash = "sha256-EI79WewUTAOFivRsR2ZjywEAYZ9Lq6YnfwPml071CqU=";

  src = fetchFromGitHub {
    owner = "alexandergknoll";
    repo = finalAttrs.pname;
    hash = finalAttrs.srcHash;
    inherit (finalAttrs) rev;
  };

  nativeBuildInputs = [
    pkg-config
    wrapGAppsHook4
  ];

  buildInputs = [
    gtk4
    gtk4-layer-shell
  ];

  meta = {
    description = "A tool that automatically maximizes the only window of a niri workspace";
    homepage = "https://github.com/Antiz96/oniri";
    license = lib.licenses.gpl3;
    mainProgram = "oniri";
    maintainers = with lib.maintainers; [ zaphyra ];
    platforms = lib.platforms.linux;
  };
})