summaryrefslogtreecommitdiff
path: root/nix/package.nix
blob: a9eace21915b99ad751c897c902b6de540df7c53 (plain) (blame)
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
{
  lib,
  rustPlatform,
  pkg-config,
  glib,
  cairo,
  pango,
  harfbuzz,
}:

let
  cargoToml = builtins.fromTOML (builtins.readFile ../Cargo.toml);
in
rustPlatform.buildRustPackage {
  pname = cargoToml.package.name;
  version = cargoToml.package.version;

  src = ../.;

  cargoLock.lockFile = ../Cargo.lock;

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [
    glib
    cairo
    pango
    harfbuzz
  ];

  meta = {
    description = cargoToml.package.description;
    homepage = cargoToml.package.repository;
    license = lib.licenses.gpl3Only;
    mainProgram = "i3bar-river";
  };
}