initial commit

master
Claudius Holeksa 2023-02-08 11:02:44 +01:00
commit dfc5235739
4 changed files with 57 additions and 0 deletions

3
default.nix Normal file
View File

@ -0,0 +1,3 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.callPackage ./derivation.nix {}

28
derivation.nix Normal file
View File

@ -0,0 +1,28 @@
{ pkgs
, stdenvNoCC
, cxx ? pkgs.gfortran12
, cc ? pkgs.gfortran12
, f77 ? pkgs.gfortran12
, cmake
, python39
, python39Packages
}:
stdenvNoCC.mkDerivation {
name = "icon-charm";
src = ./../icon-charm;
nativeBuildInputs = [
cxx
cc
cmake
python39
python39Packages.jinja2
];
cmakeFlags = [
"-DCMAKE_CXX_COMPILER=${cxx}/bin/c++"
"-DCMAKE_C_COMPILER=${cc}/bin/cc"
"-DCMAKE_FORTRAN_COMPILER=${f77}/bin/f77"
];
}

12
release.nix Normal file
View File

@ -0,0 +1,12 @@
{...}:
let
pkgs = (import <nixpkgs>{});
in
{
icon-charm-gcc12 = pkgs.callPackage ./derivation.nix {};
icon-charm-gcc11 = pkgs.callPackage ./derivation.nix {
cc = pkgs.gfortran11;
cxx = pkgs.gfortran11;
f77 = pkgs.gfortran11;
};
}

14
shell.nix Normal file
View File

@ -0,0 +1,14 @@
with import <nixpkgs> {};
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShellNoCC {
name = "icon-charm";
nativeBuildInputs = [
gfortran12
cmake
gdb
valgrind
python39
python39Packages.jinja2
];
}