summaryrefslogtreecommitdiffstats
path: root/package.nix
blob: 7791c373fa0f8bbe8454a01273264bdab487ab19 (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
37
38
39
40
41
{
  lib,
  rustPlatform,
  pkg-config,
  cmake,
  glib,
  openssl,
  libmysqlclient,
  clang,
  llvmPackages,
}:
rustPlatform.buildRustPackage {
  pname = "joklerpoint";
  version = "0.1.0";
  cargoLock = {
    lockFile = ./Cargo.lock;
  };
  src = lib.cleanSource ./.;

  nativeBuildInputs = [pkg-config cmake];
  buildInputs = [
    glib
    openssl
    libmysqlclient
    clang
    llvmPackages.libclang.lib
  ];

  LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";

  postInstall = ''
    mkdir -p $out/share/joklerpoint
    cp -r static $out/share/joklerpoint
  '';

  meta = {
    description = "Jokler points website";
    mainProgram = "joklerpoint";
    maintainers = with lib.maintainers; [jokler];
  };
}