mirror of
https://github.com/zhaofengli/attic.git
synced 2024-12-14 11:57:30 +00:00
flake.nix: Also run integration tests on stable nixpkgs
This commit is contained in:
parent
99202303be
commit
49bd872153
2 changed files with 36 additions and 8 deletions
19
flake.lock
19
flake.lock
|
@ -74,12 +74,29 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1673800717,
|
||||
"narHash": "sha256-SFHraUqLSu5cC6IxTprex/nTsI81ZQAtDvlBvGDWfnA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2f9fd351ec37f5d479556cd48be4ca340da59b8f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-22.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"crane": "crane",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
|
|
25
flake.nix
25
flake.nix
|
@ -3,6 +3,7 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-22.11";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
crane = {
|
||||
|
@ -18,7 +19,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, crane, ... }: let
|
||||
outputs = { self, nixpkgs, nixpkgs-stable, flake-utils, crane, ... }: let
|
||||
supportedSystems = flake-utils.lib.defaultSystems;
|
||||
|
||||
makeCranePkgs = pkgs: let
|
||||
|
@ -31,6 +32,12 @@
|
|||
};
|
||||
cranePkgs = makeCranePkgs pkgs;
|
||||
|
||||
pkgsStable = import nixpkgs-stable {
|
||||
inherit system;
|
||||
overlays = [];
|
||||
};
|
||||
cranePkgsStable = makeCranePkgs pkgsStable;
|
||||
|
||||
inherit (pkgs) lib;
|
||||
in rec {
|
||||
packages = {
|
||||
|
@ -130,13 +137,17 @@
|
|||
inherit (cranePkgs) attic-tests cargoArtifacts;
|
||||
};
|
||||
|
||||
checks = lib.optionalAttrs pkgs.stdenv.isLinux (import ./integration-tests {
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ self.overlays.default ];
|
||||
checks = let
|
||||
makeIntegrationTests = pkgs: import ./integration-tests {
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ self.overlays.default ];
|
||||
};
|
||||
flake = self;
|
||||
};
|
||||
flake = self;
|
||||
});
|
||||
unstableTests = makeIntegrationTests pkgs;
|
||||
stableTests = lib.mapAttrs' (name: lib.nameValuePair "stable-${name}") (makeIntegrationTests pkgsStable);
|
||||
in lib.optionalAttrs pkgs.stdenv.isLinux (unstableTests // stableTests);
|
||||
}) // {
|
||||
overlays = {
|
||||
default = final: prev: let
|
||||
|
|
Loading…
Reference in a new issue