about summary refs log tree commit diff
path: root/pkgs/tools/nix/nixos-option/default.nix
blob: d6cfc630d6e3e9c374bbbdbb723379d09d09c460 (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
, stdenv
, boost
, cmake
, pkg-config
, installShellFiles
, nix
}:

stdenv.mkDerivation {
  name = "nixos-option";

  src = lib.fileset.toSource {
    root = ./.;
    fileset = lib.fileset.fileFilter (file: file.name != "default.nix") ./.;
  };
  postInstall = ''
    installManPage ${./nixos-option.8}
  '';

  strictDeps = true;
  nativeBuildInputs = [
    cmake
    pkg-config
    installShellFiles
  ];
  buildInputs = [
    boost
    nix
  ];
  cmakeFlags = [
    "-DNIX_DEV_INCLUDEPATH=${nix.dev}/include/nix"
  ];

  meta = with lib; {
    license = licenses.lgpl2Plus;
    mainProgram = "nixos-option";
    maintainers = with maintainers; [ ];
    inherit (nix.meta) platforms;
  };
}