Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions ci/ci-pr.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This file is used to govern CI jobs for GitHub PRs

args@{ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ], src ? null, ... }:
import ./ci.nix (args // { inherit supportedSystems src; isMaster = false; })
args@{ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ], src ? builtins.fetchGit ../., ... }:
import ./ci.nix (args // { inherit supportedSystems src; })
7 changes: 2 additions & 5 deletions ci/ci.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,12 @@
# The version of the release. Will be set to the right value in ./release.nix.
, releaseVersion ? "latest"

# TODO: Remove isMaster once switched to new CD system (https://dfinity.atlassian.net/browse/INF-1149)
, isMaster ? true

, pkgs ? import ../nix { inherit system isMaster RustSec-advisory-db; }
, pkgs ? import ../nix { inherit system RustSec-advisory-db; }
}:
pkgs.lib.mk-jobset {
inherit supportedSystems;
inherit (src) rev;
mkJobsetSpec = { system, pkgs, jobset }: import ../. {
inherit system pkgs jobset RustSec-advisory-db releaseVersion isMaster src;
inherit system pkgs jobset RustSec-advisory-db releaseVersion src;
};
}
6 changes: 2 additions & 4 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{ system ? builtins.currentSystem
, src ? null
, releaseVersion ? "latest"
# TODO: Remove isMaster once switched to new CD system (https://dfinity.atlassian.net/browse/INF-1149)
, isMaster ? false
, RustSec-advisory-db ? null
, pkgs ? import ./nix { inherit system RustSec-advisory-db; }
, jobset ? import ./ci/ci.nix { inherit system releaseVersion RustSec-advisory-db pkgs isMaster src; }
, jobset ? import ./ci/ci.nix { inherit system releaseVersion RustSec-advisory-db pkgs src; }
}:
rec {
dfx = import ./dfx.nix { inherit pkgs userlib-js; };
Expand All @@ -19,7 +17,7 @@ rec {

inherit (pkgs) nix-fmt nix-fmt-check;

public = import ./public { inherit pkgs src releaseVersion isMaster; };
public = import ./public { inherit pkgs src releaseVersion; };
inherit (public) install-sh-release install-sh;

# This is to make sure CI evaluates shell derivations, builds their
Expand Down
8 changes: 3 additions & 5 deletions nix/default.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Returns the nixpkgs set overridden and extended with DFINITY specific
# packages.
{ system ? builtins.currentSystem
# TODO: Remove isMaster once switched to new CD system (https://dfinity.atlassian.net/browse/INF-1149)
, isMaster ? false
, RustSec-advisory-db ? null
}:
let
Expand Down Expand Up @@ -47,7 +45,7 @@ let
then RustSec-advisory-db
else self.sources.advisory-db;

motoko = import self.sources.motoko { system = self.system; };
motoko = import self.sources.motoko { inherit (self) system; };
dfinity = (import self.sources.dfinity { inherit (self) system; }).dfinity.rs;
napalm = self.callPackage self.sources.napalm {
pkgs = self // { nodejs = self.nodejs-12_x; };
Expand All @@ -59,7 +57,7 @@ let
lib = super.lib // {
mk-jobset = import ./mk-jobset.nix self;

mkRelease = super.callPackage ./mk-release.nix { inherit isMaster; };
mkRelease = super.callPackage ./mk-release.nix {};
};

# An attribute set mapping every supported system to a nixpkgs evaluated for
Expand All @@ -70,7 +68,7 @@ let
if supportedSystem == system
then self
else import ./. {
inherit isMaster RustSec-advisory-db;
inherit RustSec-advisory-db;
system = supportedSystem;
}
);
Expand Down
3 changes: 0 additions & 3 deletions nix/mk-release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
, gzip
, jo
, patchelf
# TODO: Remove isMaster once switched to new CD system (https://dfinity.atlassian.net/browse/INF-1149)
, isMaster ? false
}:
rname: version: from: what:
stdenv.mkDerivation {
Expand All @@ -13,7 +11,6 @@ stdenv.mkDerivation {
phases = [ "buildPhase" ];
buildInputs = [ gzip jo patchelf ];
allowedRequisites = [];
inherit isMaster;
buildPhase = ''
# Building the artifacts
mkdir -p $out
Expand Down
4 changes: 0 additions & 4 deletions public/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
, system ? builtins.currentSystem
, src ? null
, releaseVersion ? "latest"
# TODO: Remove isMaster once switched to new CD system (https://dfinity.atlassian.net/browse/INF-1149)
, isMaster ? false
}:

let
Expand Down Expand Up @@ -45,7 +43,6 @@ rec {
in
pkgs.runCommandNoCC "install-sh-lint" {
inherit version public;
inherit isMaster;
buildInputs = [ install-sh pkgs.shfmt pkgs.shellcheck ];
preferLocalBuild = true;
allowSubstitutes = false;
Expand Down Expand Up @@ -86,7 +83,6 @@ rec {
pkgs.lib.linuxOnly (
pkgs.runCommandNoCC "install-sh-release" {
inherit version;
inherit isMaster;

# `revision` will be printed by `install.sh` as follows:
#
Expand Down