File: flake.nix

package info (click to toggle)
libkdtree%2B%2B 0.7.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 884 kB
  • sloc: cpp: 2,078; sh: 623; python: 543; makefile: 90
file content (36 lines) | stat: -rw-r--r-- 1,050 bytes parent folder | download
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
{
  description = "Nix flake for libkdtree+ library";

  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
    flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
  };

  outputs = { self, nixpkgs, ... }@inputs: let
    lib = nixpkgs.lib;
    shellSystems = nixpkgs.lib.systems.flakeExposed;
    buildSystems = nixpkgs.lib.systems.flakeExposed;
    forSystems = systems: f: nixpkgs.lib.genAttrs systems (system: f system);
  in {

    devShells = forSystems shellSystems (system: let
      pkgs = nixpkgs.legacyPackages.${system};
    in {
      default = pkgs.mkShell {
        nativeBuildInputs = with pkgs; [
          nil # lsp language server for nix
          cmake
          doxygen
        ] ++ lib.optionals pkgs.hostPlatform.isLinux [ gdb ];
      };
    });

    packages = forSystems buildSystems (system: let
      pkgs = nixpkgs.legacyPackages.${system}.pkgs;
    in {
      default = self.packages.${system}.libkdtree;
      libkdtree = pkgs.callPackage ./libkdtree.nix {};
    });

  };
}