forked from lcm-proj/lcm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
52 lines (44 loc) · 1.26 KB
/
flake.nix
File metadata and controls
52 lines (44 loc) · 1.26 KB
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
50
51
52
{
description = "LCM - Lightweight Communications and Marshalling";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages = {
lcmgen = pkgs.stdenv.mkDerivation {
pname = "lcm-gen";
version = "1.5.2";
src = ./.;
nativeBuildInputs = with pkgs; [ cmake pkg-config ];
buildInputs = with pkgs; [ glib ];
cmakeFlags = [
"-DLCM_ENABLE_PYTHON=OFF"
"-DLCM_ENABLE_JAVA=OFF"
"-DLCM_ENABLE_LUA=OFF"
"-DLCM_ENABLE_TESTS=OFF"
];
buildPhase = ''
make -j$NIX_BUILD_CORES lcm-gen
'';
installPhase = ''
mkdir -p $out/bin
cp lcmgen/lcm-gen $out/bin/
'';
};
default = self.packages.${system}.lcmgen;
};
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
cmake
glib
pkg-config
];
};
});
}