Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
69 changes: 45 additions & 24 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,49 @@ let
in
if localCommonSrc != ""
then localCommonSrc
else
let sources = import ./sources.nix; in sources.common;
else sources.common;

sources = import sourcesnix { sourcesFile = ./sources.json; inherit pkgs; };

sourcesnix = builtins.fetchurl
https://raw.githubusercontent.com/nmattia/niv/506b896788d9705899592a303de95d8819504c55/nix/sources.nix;

pkgs = import commonSrc {
inherit system crossSystem config;
overlays = [
(
self: super:
let
nixFmt = self.lib.nixFmt { root = ../.; };
in
{
sources = super.sources // sources;

inherit releaseVersion;

isMaster = super.isMaster or false;

# The dfinity-sdk.packages.cargo-security-audit job has this RustSec
# advisory-db as a dependency so we add it here to the package set so
# that job has access to it.
# Hydra injects the latest RustSec-advisory-db, otherwise we piggy
# back on the one defined in sources.json.
RustSec-advisory-db =
if ! isNull RustSec-advisory-db
then RustSec-advisory-db
else self.sources.advisory-db;

motoko = import self.sources.motoko { system = 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; };
};

inherit (nixFmt) nix-fmt;
nix-fmt-check = nixFmt.check;
} // import ./overlays/dfinity-sdk.nix self super
)
] ++ overlays;
};
in
import commonSrc {
inherit system crossSystem config;
overlays = import ./overlays ++ [
(
_self: super:
{
inherit
releaseVersion
;
# The dfinity-sdk.packages.cargo-security-audit job has this RustSec
# advisory-db as a dependency so we add it here to the package set so
# that job has access to it.
# Hydra injects the latest RustSec-advisory-db, otherwise we piggy
# back on the one defined in sources.json.
RustSec-advisory-db =
if ! isNull RustSec-advisory-db
then RustSec-advisory-db
else super.sources.advisory-db;
}
)
] ++ overlays;
}
pkgs
22 changes: 0 additions & 22 deletions nix/overlays/default.nix

This file was deleted.

11 changes: 0 additions & 11 deletions nix/overlays/sources.nix

This file was deleted.

138 changes: 0 additions & 138 deletions nix/sources.nix

This file was deleted.