Skip to content

Commit

Permalink
build: Add package to build
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundmiller committed Dec 7, 2023
1 parent 8a14a97 commit db1d394
Showing 1 changed file with 32 additions and 5 deletions.
37 changes: 32 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,39 @@
pkgs,
...
}: {
# Per-system attributes can be defined here. The self' and inputs'
# module parameters provide easy access to attributes of the same
# system.
packages.default = pkgs.llvmPackages.stdenv.mkDerivation rec {
pname = "NARFMAP";
version = "1.3.1";

# Equivalent to inputs'.nixpkgs.legacyPackages.hello;
packages.default = pkgs.hello;
src = ./.;

buildInputs = [
pkgs.boost
pkgs.llvmPackages.clang
pkgs.gnumake
pkgs.gtest
pkgs.zlib
];

env = {
BOOST_INCLUDEDIR = "${pkgs.lib.getDev pkgs.boost}/include";
BOOST_LIBRARYDIR = "${pkgs.lib.getLib pkgs.boost}/lib";
GTEST_INCLUDEDIR = "${pkgs.lib.getDev pkgs.gtest}/include";
GTEST_LIBRARYDIR = "${pkgs.lib.getLib pkgs.gtest}/lib";
GTEST_ROOT = "${pkgs.gtest}";
LD_LIBRARY_PATH = "${pkgs.lib.getLib pkgs.gtest}/lib";
};

meta = with pkgs.lib; {
homepage = "https://github.com/nixvital/nix-based-cpp-starterkit";
description = ''
A template for Nix based C++ project setup.";
'';
licencse = licenses.mit;
platforms = with platforms; linux ++ darwin;
maintainers = [maintainers.breakds];
};
};

devenv.shells.default = {
name = "NARFMAP";
Expand Down

0 comments on commit db1d394

Please sign in to comment.