Update dhall-haskell, enable tests for Hydra
parent
fbc11b0698
commit
ae10abc7f2
|
@ -1,3 +0,0 @@
|
|||
[submodule "dhall-haskell"]
|
||||
path = dhall-haskell
|
||||
url = https://github.com/ehmry/dhall-haskell.git
|
|
@ -16,9 +16,7 @@ let
|
|||
toolchainOverlay = import ./toolchain-overlay;
|
||||
# Overlay of toolchain patches
|
||||
|
||||
nixpkgs' = import ./nixpkgs.nix;
|
||||
|
||||
in { nixpkgs ? nixpkgs', dhall-haskell ? ./dhall-haskell.nix }:
|
||||
in { nixpkgs ? import ./nixpkgs.nix }:
|
||||
|
||||
import nixpkgs {
|
||||
# Evaluate an overlayed Nixpkgs for a Genode target
|
||||
|
@ -28,5 +26,5 @@ import nixpkgs {
|
|||
isGenode = true;
|
||||
imports = [ ./platform.nix ];
|
||||
};
|
||||
overlays = [ (toolchainOverlay dhall-haskell) pkgOverlay ];
|
||||
overlays = [ toolchainOverlay pkgOverlay ];
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 7b36df7725a5ed40ef7bd803bb0d3eabbbbde74a
|
|
@ -0,0 +1,2 @@
|
|||
let dhall-haskell = import <dhall-haskell>;
|
||||
in { linux-dhall = dhall-haskell.dhall; }
|
|
@ -0,0 +1,67 @@
|
|||
let
|
||||
fetchNixpkgs =
|
||||
{ rev # The Git revision of nixpkgs to fetch
|
||||
, owner ? "NixOS" # Owner of the Github repository
|
||||
, sha256 # The SHA256 hash of the unpacked archive
|
||||
, system ? builtins.currentSystem # This is overridable if necessary
|
||||
}:
|
||||
|
||||
if (0 <= builtins.compareVersions builtins.nixVersion "1.12")
|
||||
|
||||
# In Nix 1.12, we can just give a `sha256` to `builtins.fetchTarball`.
|
||||
then
|
||||
(builtins.fetchTarball {
|
||||
url = "https://github.com/${owner}/nixpkgs/archive/${rev}.tar.gz";
|
||||
inherit sha256;
|
||||
})
|
||||
|
||||
# This hack should at least work for Nix 1.11
|
||||
else
|
||||
((rec {
|
||||
tarball = import <nix/fetchurl.nix> {
|
||||
url = "https://github.com/${owner}/nixpkgs/archive/${rev}.tar.gz";
|
||||
sha256 = null;
|
||||
};
|
||||
|
||||
builtin-paths = import <nix/config.nix>;
|
||||
|
||||
script = builtins.toFile "nixpkgs-unpacker" ''
|
||||
"$coreutils/mkdir" "$out"
|
||||
cd "$out"
|
||||
"$gzip" --decompress < "$tarball" | "$tar" -x --strip-components=1
|
||||
'';
|
||||
|
||||
nixpkgs = builtins.derivation ({
|
||||
name = "nixpkgs-${builtins.substring 0 6 rev}";
|
||||
|
||||
builder = builtins.storePath builtin-paths.shell;
|
||||
|
||||
args = [ script ];
|
||||
|
||||
inherit tarball system;
|
||||
|
||||
tar = builtins.storePath builtin-paths.tar;
|
||||
gzip = builtins.storePath builtin-paths.gzip;
|
||||
coreutils = builtins.storePath builtin-paths.coreutils;
|
||||
} // (if null == sha256 then
|
||||
{ }
|
||||
else {
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = sha256;
|
||||
}));
|
||||
}).nixpkgs);
|
||||
in {
|
||||
|
||||
nixpkgs = fetchNixpkgs {
|
||||
rev = "1d4de0d552ae9aa66a5b8dee5fb0650a4372d148";
|
||||
sha256 = "0xpqc1fhkvvv5dv1zmas2j1q27mi7j7dgyjcdh82mlgl1q63i660";
|
||||
};
|
||||
|
||||
nixpkgsStaticLinux = fetchNixpkgs {
|
||||
owner = "nh2";
|
||||
rev = "925aac04f4ca58aceb83beef18cb7dae0715421b";
|
||||
sha256 = "1zr8lscjl2a5cz61f0ibyx55a94v8yyp6sjzjl2gkqjrjbg99abx";
|
||||
};
|
||||
|
||||
}
|
24
release.nix
24
release.nix
|
@ -2,16 +2,30 @@
|
|||
#
|
||||
# SPDX-License-Identifier: LicenseRef-Hippocratic-1.1
|
||||
|
||||
{ genodepkgs ? builtins.fetchGit ./., nixpkgs ? <nixpkgs>
|
||||
, dhall-haskell ? ./dhall-haskell.nix }:
|
||||
let dhallPinned = import ./dhallPinnedNixpkgs.nix; in
|
||||
|
||||
let pkgs = import ./default.nix { inherit nixpkgs; };
|
||||
{ genodepkgs ? ./default.nix
|
||||
, nixpkgs ? import ./nixpkgs.nix
|
||||
, dhall-haskell ? <dhall-haskell>
|
||||
, dhallNixpkgs ? dhallPinned.nixpkgs
|
||||
, dhallNixpkgsStaticLinux ? dhallPinned.nixpkgsStaticLinux
|
||||
}:
|
||||
|
||||
let
|
||||
pkgs = import genodepkgs { inherit nixpkgs; };
|
||||
dhall-haskell' = import (dhall-haskell + "/release.nix") {
|
||||
nixpkgs = dhallNixpkgs;
|
||||
nixpkgsStaticLinux = dhallNixpkgsStaticLinux;
|
||||
};
|
||||
in {
|
||||
build.x86_64 = {
|
||||
inherit (pkgs) nova stdenv solo5;
|
||||
genode = removeAttrs pkgs.genode [ "override" "overrideDerivation" ];
|
||||
};
|
||||
|
||||
# tests.x86_64 = import ./tests { inherit pkgs; };
|
||||
# Disable tests because of Dhall issues
|
||||
tests = import ./tests {
|
||||
inherit nixpkgs;
|
||||
genodepkgs = pkgs;
|
||||
dhall-haskell = dhall-haskell';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,18 +11,24 @@ let
|
|||
solo5 = call ./solo5.nix { };
|
||||
solo5-ping = call ./solo5-ping.nix { };
|
||||
};
|
||||
nixpkgs' = import ./../nixpkgs.nix;
|
||||
in { nixpkgs ? nixpkgs' }:
|
||||
in
|
||||
|
||||
{ genodepkgs ? import ./../default.nix { }
|
||||
, nixpkgs ? import ./../nixpkgs.nix
|
||||
, dhall-haskell
|
||||
}:
|
||||
|
||||
let
|
||||
hostPkgs = import nixpkgs { };
|
||||
testPkgs = import ./.. { inherit nixpkgs; };
|
||||
hostPkgs = import nixpkgs {
|
||||
overlays = [ (self: super: { dhall = dhall-haskell.linux-dhall; }) ];
|
||||
};
|
||||
testPkgs = genodepkgs;
|
||||
|
||||
lib = hostPkgs.lib // {
|
||||
|
||||
renderDhallInit = path: args:
|
||||
hostPkgs.runCommand "init.xml" {
|
||||
buildInputs = [ testPkgs.buildPackages.linux-dhall ];
|
||||
buildInputs = [ hostPkgs.dhall ];
|
||||
initConfig = path;
|
||||
initArgs = args;
|
||||
DHALL_PRELUDE = "${testPkgs.dhallPackages.prelude}/package.dhall";
|
||||
|
@ -36,8 +42,10 @@ let
|
|||
};
|
||||
|
||||
in {
|
||||
linux = tests
|
||||
(import ./driver-linux.nix { inherit testPkgs hostPkgs lib; }).callTest;
|
||||
nova = tests
|
||||
(import ./driver-nova.nix { inherit testPkgs hostPkgs lib; }).callTest;
|
||||
x86_64 = {
|
||||
linux = tests
|
||||
(import ./driver-linux.nix { inherit testPkgs hostPkgs lib; }).callTest;
|
||||
nova = tests
|
||||
(import ./driver-nova.nix { inherit testPkgs hostPkgs lib; }).callTest;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
#
|
||||
# SPDX-License-Identifier: LicenseRef-Hippocratic-1.1
|
||||
|
||||
dhall-haskell:
|
||||
|
||||
self: super:
|
||||
|
||||
let
|
||||
|
@ -35,8 +33,6 @@ in {
|
|||
null;
|
||||
});
|
||||
|
||||
inherit (import dhall-haskell) linux-dhall;
|
||||
|
||||
genodeHeaders = self.callPackage ./headers { };
|
||||
|
||||
inherit genodelibc;
|
||||
|
|
Loading…
Reference in New Issue