Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tabe committed Jun 26, 2023
0 parents commit 0a02cd9
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Build
run: nix build
- name: Read a symlink
run: echo "UPLOAD_PATH=$(readlink -f result)" >> $GITHUB_ENV
- uses: actions/upload-artifact@v3
with:
name: result
path: ${{ env.UPLOAD_PATH }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/result
45 changes: 45 additions & 0 deletions flake.lock

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

35 changes: 35 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
description = "A flake for building SUNDIALS for Flint";

inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-23.05;

inputs.sundials = {
url = github:LLNL/sundials/v2.7.0;
flake = false;
};

outputs = { self, nixpkgs, sundials }: let

allSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];

forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f (import nixpkgs { inherit system; }));

in {

packages = forAllSystems (pkgs: with pkgs; let

flint-sundials = stdenv.mkDerivation {
pname = "flint-sundials";
version = "2.7.0";
nativeBuildInputs = [ cmake python3 ];
src = sundials;
# doCheck = true;
};

in {

default = flint-sundials;

});
};
}

0 comments on commit 0a02cd9

Please sign in to comment.