Skip to content

Open-Systems-Innovation/custom-nixpkgs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Nixpkgs Overlay for OSI

This repository contains Nix packages used internally at OSI and not available on nixpkgs. These packages are not merged with nixpkgs because:

  1. They are only useful for very specific projects (e.g. a specific compilation of a library)
  2. They are only used in the internal work flow of OSI.

List of packages

dev-env

Creates a standard development environment for OSI simulation projects.

add automatic git integration

firedrake

Firedrake is an automated system for the solution of partial differential equations used in the finite element method.

hello-nix

hello-nix is a simple example program for packaging programs for custom-nixpkgs

hypre

HYPRE is a library of high performance preconditioners and solvers featuring multigrid methods for the solution of large, sparse linear systems of equations on massively parallel computers.

libspatialindex

libspatialindex provides an extensible framework for spatial indexing, spatial queries, user-friendly interfaces for data management, customization of index characteristics, and index persistence for both internal and external memory structures.

mpi4py

mpi4py provides MPI bindings for the Python programming language, allowing python programs to exploit multiple processors.

petsc

PETSc is for the scalable solution of partial differential equations. Pets is currently compiles with a very basic configuration that doesn’t include any external libraries (except BLAS/LAPACK). Future improvements include adding options for external libraries and common compile configurations so the each flake.nix or nix environment can have a customized PETSc install. This enables us to easily have different packages for specific configurations like debugging or testing.

petsc-project

A development environment specifically for PETSc projects.

pylit

Pylit is a tool for literate programming. Used in the demo files of Firedrake

recursivenodes

recursivenodes creates nodes for the polynomial interpolation on the simplex in arbitrary dimensions.

scotch

scotch is a software packaging library for graph and mesh/hypergraph partitioning, graph clustering, and sparse matrix ordering.

Using this repository

To use this repository, create a new flake.nix file, and add the following into the inputs:

inputs = {
  nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  custom-nixpkgs.url = "github:Open-Systems-Innovation/custom-nixpkgs";
};

Now you can consume the overlay in a let ... in statement right after the inputs of your outputs funciton:

outputs = { self, nixpkgs, custom-nixpkgs, ... }:
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs {
        inherit system;
        overlays = [ custom-nixpkgs.overlays.default ];
      };
    in

Now you can use this in a devShell or a buildInput as you like:

devShells.${system}.default = pkgs.mkShell {
  name = "default";
     
  packages = [
  # General packages
    pkgs.hello-nix
  ];
};

Adding this repo as an overlay to your Home-manager config

If you are using home-manager in a flake for your NixOS configuration, simply add the following to your flake.nix input

custom-nixpkgs.url = "github:Open-Systems-Innovation/custom-nixpkgs";

And in your home-manager file, add the following

nixpkgs.overlays = [inputs.custom-nixpkgs.overlays.default];

Now you can add custom-nixpkgs to your home.packages and use them in local flakes.

Developing packages

To develop a nix package using this repo, first create a new directory in the pkgs directory with a package.nix file in it. Add this file to the overlay and packages in the flake.nix file.

To test the package run:

nix develop .#name-of-package

Acknowledgments

The main structure of this repo is based on the similar package by Drupol.

About

Custom Nix packages used internally at OSI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published