forked from lix-project/nix-eval-jobs
Merge pull request #20 from nix-community/stable-unstable-ci
Run build against both stable nix and nixUnstable in CI
This commit is contained in:
commit
63e728fcbb
|
@ -1,6 +1,6 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, nixUnstable
|
||||
, nix
|
||||
, meson
|
||||
, cmake
|
||||
, ninja
|
||||
|
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
|
|||
src = if srcDir == null then filterMesonBuild ./. else srcDir;
|
||||
buildInputs = [
|
||||
nlohmann_json
|
||||
nixUnstable
|
||||
nix
|
||||
boost
|
||||
];
|
||||
nativeBuildInputs = [
|
||||
|
|
12
flake.lock
12
flake.lock
|
@ -2,11 +2,11 @@
|
|||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1637014545,
|
||||
"narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=",
|
||||
"lastModified": 1638122382,
|
||||
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4",
|
||||
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -17,11 +17,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1639573498,
|
||||
"narHash": "sha256-YAoywqjyjOJYuEZpA8sln84jk99GG9hYbPEYXwGEGGM=",
|
||||
"lastModified": 1641577433,
|
||||
"narHash": "sha256-T7lS8vpbC3dgtrkb2ueC9HWaX4RYUwdP7IEttnvKQ8Y=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "aef12c8678fd5e927edba764bd04f3ba2930ae15",
|
||||
"rev": "568e0bc498ee51fdd88e1e94089de05f2fdbd18b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
13
flake.nix
13
flake.nix
|
@ -13,7 +13,14 @@
|
|||
rec {
|
||||
packages.nix-eval-jobs = pkgs.callPackage ./default.nix drvArgs;
|
||||
|
||||
checks = {
|
||||
checks =
|
||||
let
|
||||
mkVariant = nix: packages.nix-eval-jobs.overrideAttrs (_: {
|
||||
name = "nix-eval-jobs-${nix.version}";
|
||||
inherit (nix) version;
|
||||
});
|
||||
in
|
||||
{
|
||||
|
||||
editorconfig = pkgs.runCommand "editorconfig-check"
|
||||
{
|
||||
|
@ -35,8 +42,8 @@
|
|||
touch $out
|
||||
'';
|
||||
|
||||
build = packages.nix-eval-jobs;
|
||||
|
||||
build = mkVariant pkgs.nix;
|
||||
build-unstable = mkVariant pkgs.nixUnstable;
|
||||
};
|
||||
|
||||
defaultPackage = self.packages.${system}.nix-eval-jobs;
|
||||
|
|
18
shell.nix
18
shell.nix
|
@ -1,8 +1,22 @@
|
|||
{ pkgs ? import <nixpkgs> { }
|
||||
{ pkgs ? (
|
||||
let
|
||||
inherit (builtins) fromJSON readFile;
|
||||
flakeLock = fromJSON (readFile ./flake.lock);
|
||||
locked = flakeLock.nodes.nixpkgs.locked;
|
||||
nixpkgs = assert locked.type == "github"; builtins.fetchTarball {
|
||||
url = "https://github.com/${locked.owner}/${locked.repo}/archive/${locked.rev}.tar.gz";
|
||||
sha256 = locked.narHash;
|
||||
};
|
||||
in
|
||||
import nixpkgs { }
|
||||
)
|
||||
, srcDir ? null
|
||||
}:
|
||||
|
||||
(pkgs.callPackage ./default.nix { inherit srcDir; }).overrideAttrs (old: {
|
||||
(pkgs.callPackage ./default.nix {
|
||||
inherit srcDir;
|
||||
nix = pkgs.nixUnstable;
|
||||
}).overrideAttrs (old: {
|
||||
|
||||
nativeBuildInputs = old.nativeBuildInputs ++ [
|
||||
|
||||
|
|
Loading…
Reference in a new issue