Skip to content
Snippets Groups Projects
Commit e5da4042 authored by Daniel Vonk's avatar Daniel Vonk
Browse files

Add nix flake

Can be removed once we agree on the package management solution.
parent 1cc604f5
No related branches found
No related tags found
2 merge requests!19Merge develop into main,!13Add CI System to Sassena and Modernize Build-System
{ pkgs, lib }:
pkgs.stdenv.mkDerivation rec {
pname = "sassena";
version = "0.1.0";
src = ./.;
nativeBuildInputs = with pkgs; [ ninja python3 cmake clang-tools gcc13 ];
buildInputs = with pkgs;
let boost-mpi = boost.override { useMpi = true; };
in [ blas fftw libxml2 zlib boost-mpi hdf5 hdf5-cpp hdf5-mpi mpi ];
configurePhase = ''
mkdir build
cd build
cmake -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..
'';
buildPhase = ''
ninja
'';
meta = with lib; { platforms = with platforms; linux ++ darwin; };
}
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1685566663,
"narHash": "sha256-btHN1czJ6rzteeCuE/PNrdssqYD2nIA4w48miQAFloM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4ecab3273592f27479a583fb6d975d4aba3486fe",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"utils": "utils"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
{
description = "Sassena";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/23.05";
utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, ... }@inputs:
inputs.utils.lib.eachSystem [
"x86_64-linux"
"i686-linux"
"aarch64-linux"
"x86_64-darwin"
] (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ ];
};
in {
devShells.default = pkgs.mkShell rec {
name = "sassena";
nativeBuildInputs = with pkgs;
let boost-mpi = boost.override { useMpi = true; };
in [
clang-tools
cmake
ninja
python3
blas
fftw
libxml2
zlib
boost-mpi
# hdf5
hdf5-cpp
hdf5-mpi
mpi
];
packages = with pkgs; [
gcc13
];
};
packages.default = pkgs.callPackage ./default.nix { };
});
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment