Skip to content

Commit

Permalink
Merge pull request #69 from dschrempf/nix-flake
Browse files Browse the repository at this point in the history
Nix flake
  • Loading branch information
iqtree authored May 2, 2024
2 parents a4e80ef + eeddd3f commit d8887b0
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ terraphast/
test_scripts/
vectorclass/
zlib-1.2.7/
/.direnv/
/.envrc
43 changes: 43 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 39 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
description = "IQ-TREE 2";

inputs.flake-utils.url = "github:numtide/flake-utils";

inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable-small";

outputs =
{ self
, flake-utils
, nixpkgs
}:
flake-utils.lib.eachDefaultSystem (
system:
let
# # For Nixpkgs and the NUR repository, the following two forms are
# # equivalent because the flake just imports the base directory.
pkgs = nixpkgs.legacyPackages.${system};
# pkgs = import nixpkgs {
# inherit system;
# config = { allowUnfree = true; };
# };
in
{
devShell = pkgs.mkShell {
packages = with pkgs; [
# See https://github.com/NixOS/nixpkgs/issues/59209.
bashInteractive
];
nativeBuildInputs = with pkgs; [ cmake ];
buildInputs = with pkgs; [ boost eigen zlib ];

cmakeFlags = [
"-DIQTREE_FLAGS=omp"
];
};
}
);
}

0 comments on commit d8887b0

Please sign in to comment.