Skip to content

Commit 281058e

Browse files
committed
Propagate system in preparation for flakization.
1 parent 304f365 commit 281058e

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

.nix/fallback-config.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
with (import (import ./nixpkgs.nix) {}).lib;
1+
with import "${import ./nixpkgs.nix}/lib";
22
{
33
## DO NOT CHANGE THIS
44
format = "1.0.0";

config-parser-1.0.0/default.nix

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ with builtins;
1414
ocaml-override ? {},
1515
global-override ? {},
1616
lib,
17+
system
1718
}@initial:
1819
with lib;
1920
let config = import ./normalize.nix
20-
{ inherit (initial) src lib config nixpkgs; };
21+
{ inherit (initial) src lib config nixpkgs system; };
2122
in with config; let
2223

2324
bundle-ppaths = bundle:
@@ -66,7 +67,7 @@ in with config; let
6667
{ inherit lib overlays-dir rocq-overlays-dir coq-overlays-dir ocaml-overlays-dir bundle;
6768
inherit (config) attribute coq-attribute no-rocq-yet pname shell-attribute shell-pname src; };
6869

69-
pkgs = import config.nixpkgs { inherit overlays; };
70+
pkgs = import config.nixpkgs { inherit overlays system; };
7071

7172
ci = import ./ci.nix { inherit lib this-shell-pkg pkgs bundle; };
7273

config-parser-1.0.0/normalize.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is a toolbox file to parse a ./nix/config.nix
22
# file in format 1.0.0
3-
{lib, config, nixpkgs, src}@initial:
3+
{lib, config, nixpkgs, src, system}@initial:
44
with builtins; with lib;
55
let
66
normalize-coqpkg = name: pkg: let j = pkg.job or name; in

default.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ in
2929
update-nixpkgs ? false,
3030
job ? null,
3131
bundle ? null,
32-
inNixShell ? null
32+
inNixShell ? null,
33+
system ? builtins.currentSystem
3334
}@args:
3435
let
3536
optionalImport = f: d:
@@ -40,7 +41,8 @@ let
4041
config = (optionalImport config-file (optionalImport fallback-file {}))
4142
// config;
4243
nixpkgs = optionalImport nixpkgs-file (throw "cannot find nixpkgs");
43-
pkgs = import initial.nixpkgs {};
44+
inherit system;
45+
pkgs = import initial.nixpkgs { inherit system; };
4446
src = src;
4547
lib = (initial.pkgs.coqPackages.lib or tmp-pkgs.lib)
4648
// { diag = f: x: f x x; };

0 commit comments

Comments
 (0)