crane/flake.nix
Ivan Petkov 0f3e3e9a9b
Bring all tests back under nix flake check
* Seems like whatever issue was preventing us from evaluating
  derivations for other architectures (without actually building them)
  has been resolved, and now we can nicely test everything with a single
  invocation of `nix flake check`
2022-01-04 12:55:36 -08:00

54 lines
1.2 KiB
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
nix-std.url = "github:chessai/nix-std";
utils = {
url = "github:numtide/flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ self, nixpkgs, nix-std, utils, ... }:
let
myPkgsFor = pkgs: pkgs.callPackages ./pkgs { };
in
{
overlay = final: prev: myPkgsFor final;
} // utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
myPkgs = myPkgsFor pkgs;
# To override do: lib.overrideScope' (self: super: { ... });
lib = import ./lib {
inherit (nix-std.lib.serde) fromTOML toTOML;
inherit (pkgs) lib newScope;
inherit myPkgs;
};
checks = pkgs.callPackages ./checks {
inherit pkgs;
myLib = lib;
};
in
{
inherit checks lib;
packages = myPkgs;
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
nixpkgs-fmt
];
};
});
}