mirror of
https://github.com/ipetkov/crane.git
synced 2024-11-27 02:52:02 +03:00
0f3e3e9a9b
* 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`
54 lines
1.2 KiB
Nix
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
|
|
];
|
|
};
|
|
});
|
|
}
|