nim: patch in support for running native
This commit is contained in:
parent
6158b58569
commit
1faf3aff1b
|
@ -119,6 +119,11 @@ the port definition using a `nativeBuildInputs` attribute.
|
|||
Note that the hash checked into `ports.nix` is an *output hash*. The port hash
|
||||
within the Genode source tree is an *explicit input hash*.
|
||||
|
||||
### Building a package from a test
|
||||
|
||||
```sh
|
||||
nix build -L .#checks.x86_64-linux.«TEST_NAME».nodes.machine.config.genode.init.children.«CHILD_NAME».package
|
||||
```
|
||||
|
||||
## Legal
|
||||
|
||||
|
|
|
@ -165,6 +165,17 @@ in nullPkgs // {
|
|||
# Stay clear of upstream on this one.
|
||||
addPatchesHost [ ./ncurses/genode.patch ] prev.ncurses;
|
||||
|
||||
nim-unwrapped =
|
||||
# programs are still linking to posix library
|
||||
overrideAttrsTarget ({ patches, ... }: {
|
||||
version = "1.6.8";
|
||||
src = fetchurl {
|
||||
url = "https://nim-lang.org/download/nim-1.6.8.tar.xz";
|
||||
hash = "sha256-D1tlzbYPeK9BywdcI4mDaJoeH34lyBnxeYYsGKSEz1c=";
|
||||
};
|
||||
patches = patches ++ [ ./nim.patch ];
|
||||
}) prev.nim-unwrapped;
|
||||
|
||||
nimPackages =
|
||||
# Packages from the Nimble flake with adjustments.
|
||||
prev.nimPackages.overrideScope' (_: prev': {
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -6,7 +6,6 @@
|
|||
nimPackages.buildNimPackage {
|
||||
pname = "test_nim";
|
||||
inherit (nim) version;
|
||||
nimDefines = [ "posix" ];
|
||||
unpackPhase = ''
|
||||
mkdir test
|
||||
cd test
|
||||
|
@ -19,7 +18,6 @@
|
|||
};
|
||||
in {
|
||||
package = testNim;
|
||||
extraInputs = with pkgs.genodePackages; [ libc stdcxx ];
|
||||
configFile = builtins.toFile "nim.dhall" ''
|
||||
let Sigil = env:DHALL_SIGIL
|
||||
|
||||
|
@ -27,18 +25,16 @@
|
|||
|
||||
let Child = Init.Child
|
||||
|
||||
let Libc = Sigil.Libc
|
||||
|
||||
in λ(binary : Text) →
|
||||
Child.flat
|
||||
Child.Attributes::{
|
||||
, binary
|
||||
, config = Init.Config::{ attributes = toMap { ld_verbose = "true" } }
|
||||
, exitPropagate = True
|
||||
, resources = Sigil.Init.Resources::{
|
||||
, caps = 500
|
||||
, ram = Sigil.units.MiB 10
|
||||
}
|
||||
, config = Libc.toConfig Libc.default
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue