aboutsummaryrefslogtreecommitdiff
path: root/day2/ex3-R/flake.nix
blob: cd55877d4ae3dab56cb94b62cb52ae245b8fab52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs";
    bionix.url = "github:papenfusslab/bionix";
    flake-utils.url = "github:numtide/flake-utils";
  };

  outputs = {
    self,
    nixpkgs,
    bionix,
    flake-utils,
  }:
    flake-utils.lib.eachDefaultSystem (system: let
      pkgs = import nixpkgs {
        inherit system;
        config.rPackageOverrides = self:
          with self; {
            edgeR = (import nixpkgs {inherit system;}).rPackages.edgeR.overrideAttrs (attrs: {
              buildInputs = attrs.buildInputs ++ lib.optional stdenv.isDarwin libiconv;
            });
          };
      };
      bionix' = import bionix {nixpkgs = pkgs;};
    in {
      defaultPackage = bionix'.callBionix ./. {};
      packages.solution = bionix'.callBionix ./solution.nix {};
    });
}