nixpkgs-update/flake.nix

44 lines
1.8 KiB
Nix
Raw Normal View History

2020-06-10 07:30:48 +03:00
{
2023-01-02 02:29:41 +03:00
description = "update nixpkgs automatically";
2020-06-10 07:30:48 +03:00
2021-08-25 06:23:54 +03:00
inputs.mmdoc.url = "github:ryantm/mmdoc";
inputs.mmdoc.inputs.nixpkgs.follows = "nixpkgs";
2020-06-10 07:30:48 +03:00
2024-02-29 03:09:40 +03:00
inputs.treefmt-nix.url = "github:numtide/treefmt-nix";
inputs.treefmt-nix.inputs.nixpkgs.follows = "nixpkgs";
inputs.runtimeDeps.url = "github:NixOS/nixpkgs/nixos-unstable-small";
nixConfig.extra-substituters = "https://nix-community.cachix.org";
nixConfig.extra-trusted-public-keys = "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=";
outputs = { self, nixpkgs, mmdoc, treefmt-nix, runtimeDeps } @ args:
2024-02-29 03:09:40 +03:00
let
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
eachSystem = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
treefmtEval = eachSystem (pkgs: treefmt-nix.lib.evalModule pkgs {
projectRootFile = ".git/config";
programs.ormolu.enable = true;
});
in
2021-08-25 06:23:54 +03:00
{
checks.x86_64-linux =
let
packages = nixpkgs.lib.mapAttrs' (n: nixpkgs.lib.nameValuePair "package-${n}") self.packages.x86_64-linux;
devShells = nixpkgs.lib.mapAttrs' (n: nixpkgs.lib.nameValuePair "devShell-${n}") self.devShells.x86_64-linux;
in
2024-02-29 03:09:40 +03:00
packages // devShells // {
treefmt = treefmtEval.x86_64-linux.config.build.check self;
};
formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
2023-01-02 02:29:41 +03:00
packages.x86_64-linux = import ./pkgs/default.nix (args // { system = "x86_64-linux"; });
2023-01-02 02:48:22 +03:00
devShells.x86_64-linux.default = self.packages."x86_64-linux".devShell;
# nix flake check is broken for these when run on x86_64-linux
# packages.x86_64-darwin = import ./pkgs/default.nix (args // { system = "x86_64-darwin"; });
# devShells.x86_64-darwin.default = self.packages."x86_64-darwin".devShell;
2021-08-25 06:23:54 +03:00
};
2020-06-10 07:30:48 +03:00
}