2
0
Fork 0

Optionally pass extraOverlays through release.nix

This allows packages to be be overriden simultaneously for both builds
and tests.
20.02
Emery Hemingway 3 years ago
parent d343e1ee7b
commit 1df76e3bca
  1. 6
      default.nix
  2. 18
      hydra/solo5.nix
  3. 5
      release.nix

@ -3,7 +3,7 @@
# SPDX-License-Identifier: LicenseRef-Hippocratic-1.1
let
pkgOverlay = self: super:
nativeOverlay = self: super:
# Overlay of locally defined packages
with self; {
depot = callPackage ./depot { };
@ -19,7 +19,7 @@ let
toolchainOverlay = import ./toolchain-overlay;
# Overlay of toolchain patches
in { nixpkgs ? import ./nixpkgs.nix, nim-overlay ? <nim-overlay> }:
in { nixpkgs ? ../nixpkgs, nim-overlay ? <nim-overlay>, extraOverlays ? [] }:
import nixpkgs {
# Evaluate an overlayed Nixpkgs for a Genode target
@ -29,5 +29,5 @@ import nixpkgs {
isGenode = true;
imports = [ ./platform.nix ];
};
overlays = [ toolchainOverlay (import nim-overlay) pkgOverlay ];
overlays = [ toolchainOverlay nativeOverlay (import nim-overlay) ] ++ extraOverlays;
}

@ -6,10 +6,6 @@
, nim-overlay, prSrc }:
let
release = import ../release.nix {
inherit dhall-haskell dhallNixpkgs dhallNixpkgsStaticLinux nixpkgs
genodepkgs nim-overlay;
};
prOverride = attrs: {
src = prSrc;
@ -23,5 +19,15 @@ let
'';
};
in
{ build.x86_64.solo5 = pkgs.solo5.overrideAttrs prOverride; }
extraOverlays =
[ (self: super: { solo5 = super.solo5.overrideAttrs prOverride; }) ];
release = import ../release.nix {
inherit dhall-haskell dhallNixpkgs dhallNixpkgsStaticLinux nixpkgs
genodepkgs nim-overlay extraOverlays;
};
in {
build.x86_64.solo5 = release.build.x86_64.solo5;
tests.x86_64.nova.solo5 = release.tests.x86_64.nova.solo5;
}

@ -2,7 +2,7 @@
#
# SPDX-License-Identifier: LicenseRef-Hippocratic-1.1
let dhallPinned = import ./dhallPinnedNixpkgs.nix; in
let dhallPinned = import ../dhall-haskell/nix/pinnedNixpkgs.nix; in
{ genodepkgs ? ./default.nix
, nixpkgs ? import ./nixpkgs.nix
@ -10,10 +10,11 @@ let dhallPinned = import ./dhallPinnedNixpkgs.nix; in
, dhallNixpkgs ? dhallPinned.nixpkgs
, dhallNixpkgsStaticLinux ? dhallPinned.nixpkgsStaticLinux
, nim-overlay ? <nim-overlay>
, extraOverlays ? []
}:
let
pkgs = import genodepkgs { inherit nixpkgs nim-overlay; };
pkgs = import genodepkgs { inherit nixpkgs nim-overlay extraOverlays; };
dhall-haskell' = import (dhall-haskell + "/release.nix") {
nixpkgs = dhallNixpkgs;
nixpkgsStaticLinux = dhallNixpkgsStaticLinux;

Loading…
Cancel
Save