-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
49 lines (44 loc) · 1.14 KB
/
default.nix
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
45
46
47
48
49
{ pkgs ? import <nixpkgs> { } }:
let
lib = pkgs.lib;
getLibFolder = pkg: "${pkg}/lib";
libiconvPath = "${pkgs.libiconv}/lib";
manifest = (pkgs.lib.importTOML ./Cargo.toml).package;
in
pkgs.rustPlatform.buildRustPackage rec {
pname = manifest.name;
version = manifest.version;
cargoLock.lockFile = ./Cargo.lock;
src = pkgs.lib.cleanSource ./.;
buildInputs = [
pkgs.gcc
pkgs.libiconv
pkgs.libgccjit
pkgs.llvmPackages.llvm
pkgs.llvmPackages.clang
];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
(getLibFolder pkgs.gcc)
(getLibFolder pkgs.llvmPackages.llvm)
libiconvPath
];
NIX_LDFLAGS = "-L${libiconvPath} -L${./lib}";
meta = with lib; {
homepage = manifest.homepage;
description = manifest.description;
licencse = licenses.mit;
platforms = with platforms; linux ++ darwin;
maintainers = [
{
name = "Sokhibjon Orzikulov";
email = "[email protected]";
handle = "orzklv";
github = "orzklv";
githubId = 54666588;
keys = [{
fingerprint = "00D2 7BC6 8707 0683 FBB9 137C 3C35 D3AF 0DA1 D6A8";
}];
}
];
};
}