Move packaging of Genode core repositories here
parent
49b4209526
commit
48eec79d46
@ -0,0 +1,24 @@
|
||||
{ nixpkgs, packages, dhallApps }:
|
||||
|
||||
rec {
|
||||
nova-image = let
|
||||
drv = import ./nova-image {
|
||||
stdenv = packages.stdenv;
|
||||
inherit nixpkgs dhallApps packages;
|
||||
};
|
||||
in {
|
||||
type = "app";
|
||||
program = "${drv}/bin/nova-image";
|
||||
};
|
||||
|
||||
nova-iso = let
|
||||
drv = import ./nova-iso {
|
||||
stdenv = packages.stdenv;
|
||||
inherit nixpkgs dhallApps packages nova-image;
|
||||
};
|
||||
in {
|
||||
type = "app";
|
||||
program = "${drv}/bin/nova-iso";
|
||||
};
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
{ stdenv, nixpkgs, dhallApps, packages }:
|
||||
|
||||
let inherit (packages.genode) base-nova;
|
||||
in nixpkgs.writeScriptBin "nova-image" (with nixpkgs.buildPackages;
|
||||
let inherit (stdenv) cc;
|
||||
|
||||
in ''
|
||||
#!${runtimeShell}
|
||||
set -eu
|
||||
|
||||
CC="${cc}/bin/${cc.targetPrefix}cc"
|
||||
LD="${buildPackages.binutils}/bin/${buildPackages.binutils.targetPrefix}ld"
|
||||
|
||||
TMPDIR="$(${coreutils}/bin/mktemp -p /tmp -d nova-iso.XXXX)"
|
||||
# trap "rm -rf $TMPDIR" err exit
|
||||
|
||||
CORE_NOVA="${base-nova}/lib/core-nova.o"
|
||||
|
||||
export DHALL_PRELUDE=${packages.dhallPrelude}/package.dhall
|
||||
export DHALL_GENODE=${packages.dhallGenode}/package.dhall
|
||||
${dhallApps.dhall.program} text <<< "(${
|
||||
../nova-modules.as.dhall
|
||||
}) ($@)" > "$TMPDIR/modules.as"
|
||||
|
||||
# compile the boot modules into one object file
|
||||
$CC -c -x assembler -o "$TMPDIR/boot_modules.o" "$TMPDIR/modules.as"
|
||||
|
||||
# link final image
|
||||
$LD -nostdlib \
|
||||
-T${base-nova.src}/repos/base/src/ld/genode.ld \
|
||||
-T${base-nova.src}/repos/base-nova/src/core/core-bss.ld \
|
||||
-z max-page-size=0x1000 \
|
||||
-Ttext=0x100000 -gc-sections \
|
||||
"$CORE_NOVA" "$TMPDIR/boot_modules.o" \
|
||||
-o "image.elf"
|
||||
'')
|
@ -0,0 +1,54 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
{ stdenv, nixpkgs, dhallApps, packages, nova-image }:
|
||||
|
||||
nixpkgs.writeScriptBin "nova-iso" (with nixpkgs.buildPackages;
|
||||
let inherit (stdenv) cc;
|
||||
|
||||
in ''
|
||||
#!${runtimeShell}
|
||||
set -eu
|
||||
|
||||
CC="${cc}/bin/${cc.targetPrefix}cc"
|
||||
LD="${buildPackages.binutils}/bin/${buildPackages.binutils.targetPrefix}ld"
|
||||
SYSLINUX="${syslinux}/share/syslinux"
|
||||
|
||||
TMPDIR="$(${coreutils}/bin/mktemp -p /tmp -d nova-iso.XXXX)"
|
||||
mkdir -p "$TMPDIR/boot/syslinux"
|
||||
trap "rm -rf $TMPDIR" err exit
|
||||
|
||||
${nova-image.program} $@
|
||||
mv image.elf "$TMPDIR/boot"
|
||||
|
||||
pushd "$TMPDIR"
|
||||
|
||||
# build ISO image
|
||||
cp ${packages.NOVA}/hypervisor* boot/hypervisor
|
||||
cp ${./isolinux.cfg} boot/syslinux/isolinux.cfg
|
||||
cp \
|
||||
$SYSLINUX/isolinux.bin \
|
||||
$SYSLINUX/ldlinux.c32 \
|
||||
$SYSLINUX/libcom32.c32 \
|
||||
$SYSLINUX/mboot.c32 \
|
||||
boot/syslinux
|
||||
chmod +w boot/syslinux/isolinux.bin
|
||||
|
||||
ISO_FILE="''${DIRSTACK[1]}/nova.iso"
|
||||
|
||||
${cdrkit}/bin/mkisofs -o "$ISO_FILE" \
|
||||
-b syslinux/isolinux.bin -c syslinux/boot.cat \
|
||||
-no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||
-iso-level 2 \
|
||||
boot
|
||||
|
||||
popd
|
||||
|
||||
# build test script
|
||||
QEMU_SCRIPT=boot-qemu.sh
|
||||
cat > "$QEMU_SCRIPT" << EOF
|
||||
#!/bin/sh
|
||||
qemu-system-x86_64 -cdrom nova.iso -machine q35 -serial mon:stdio \$@
|
||||
EOF
|
||||
|
||||
chmod +x "$QEMU_SCRIPT"
|
||||
'')
|
@ -0,0 +1,5 @@
|
||||
SERIAL
|
||||
DEFAULT 0
|
||||
LABEL 0
|
||||
KERNEL mboot.c32
|
||||
APPEND /hypervisor iommu novpid serial --- /image.elf
|
@ -0,0 +1,117 @@
|
||||
let Genode = env:DHALL_GENODE
|
||||
|
||||
let Prelude = Genode.Prelude
|
||||
|
||||
let Configuration =
|
||||
{ arch : < x86_32 | x86_64 >
|
||||
, config : Genode.Init.Type
|
||||
, rom : Prelude.Map.Type Text Text
|
||||
}
|
||||
: Type
|
||||
|
||||
in λ ( boot
|
||||
: Configuration
|
||||
)
|
||||
→ let NaturalIndex =
|
||||
{ index : Natural, value : Text }
|
||||
|
||||
let TextIndex = { index : Text, value : Text }
|
||||
|
||||
let moduleKeys =
|
||||
let keys = Prelude.Map.keys Text Text boot.rom
|
||||
|
||||
in [ "config" ] # keys
|
||||
|
||||
let moduleValues =
|
||||
let values = Prelude.Map.values Text Text boot.rom
|
||||
|
||||
let incbin =
|
||||
Prelude.List.map
|
||||
Text
|
||||
Text
|
||||
(λ(path : Text) → ".incbin ${Text/show path}")
|
||||
values
|
||||
|
||||
in [ ".ascii ${Text/show (Genode.Init.render boot.config)}" ]
|
||||
# incbin
|
||||
|
||||
let map =
|
||||
λ(list : List Text)
|
||||
→ λ(f : TextIndex → Text)
|
||||
→ let indexedNatural = Prelude.List.indexed Text list
|
||||
|
||||
let indexed =
|
||||
Prelude.List.map
|
||||
NaturalIndex
|
||||
TextIndex
|
||||
( λ(x : NaturalIndex)
|
||||
→ { index = Prelude.Natural.show (x.index + 1)
|
||||
, value = x.value
|
||||
}
|
||||
)
|
||||
indexedNatural
|
||||
|
||||
let texts = Prelude.List.map TextIndex Text f indexed
|
||||
|
||||
in Prelude.Text.concatSep "\n" texts
|
||||
|
||||
let mapNames = map moduleKeys
|
||||
|
||||
let mapValues = map moduleValues
|
||||
|
||||
let addressType = merge { x86_32 = ".long", x86_64 = ".quad" } boot.arch
|
||||
|
||||
in ''
|
||||
.set MIN_PAGE_SIZE_LOG2, 12
|
||||
.set DATA_ACCESS_ALIGNM_LOG2, 3
|
||||
.section .data
|
||||
.p2align DATA_ACCESS_ALIGNM_LOG2
|
||||
.global _boot_modules_headers_begin
|
||||
_boot_modules_headers_begin:
|
||||
|
||||
''
|
||||
++ mapNames
|
||||
( λ ( m
|
||||
: TextIndex
|
||||
)
|
||||
→ ''
|
||||
${addressType} _boot_module_${m.index}_name
|
||||
${addressType} _boot_module_${m.index}_begin
|
||||
${addressType} _boot_module_${m.index}_end - _boot_module_${m.index}_begin
|
||||
''
|
||||
)
|
||||
++ ''
|
||||
.global _boot_modules_headers_end
|
||||
_boot_modules_headers_end:
|
||||
|
||||
''
|
||||
++ mapNames
|
||||
( λ(m : TextIndex)
|
||||
→ ''
|
||||
.p2align DATA_ACCESS_ALIGNM_LOG2
|
||||
_boot_module_${m.index}_name:
|
||||
.string "${m.value}"
|
||||
.byte 0
|
||||
''
|
||||
)
|
||||
++ ''
|
||||
.section .data.boot_modules_binaries
|
||||
|
||||
.global _boot_modules_binaries_begin
|
||||
_boot_modules_binaries_begin:
|
||||
|
||||
''
|
||||
++ mapValues
|
||||
( λ(m : TextIndex)
|
||||
→ ''
|
||||
.p2align MIN_PAGE_SIZE_LOG2
|
||||
_boot_module_${m.index}_begin:
|
||||
${m.value}
|
||||
_boot_module_${m.index}_end:
|
||||
''
|
||||
)
|
||||
++ ''
|
||||
.p2align MIN_PAGE_SIZE_LOG2
|
||||
.global _boot_modules_binaries_end
|
||||
_boot_modules_binaries_end:
|
||||
''
|
@ -0,0 +1,46 @@
|
||||
# SPDX-FileCopyrightText: Emery Hemingway
|
||||
#
|
||||
# SPDX-License-Identifier: LicenseRef-Hippocratic-1.1
|
||||
|
||||
{ stdenv, buildPackages, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
ARCH = if stdenv.isx86_32 then
|
||||
"x86_32"
|
||||
else if stdenv.isx86_64 then
|
||||
"x86_64"
|
||||
else
|
||||
null;
|
||||
in if ARCH == null then
|
||||
null
|
||||
else
|
||||
|
||||
buildPackages.stdenv.mkDerivation rec {
|
||||
# Borrow the build host compiler,
|
||||
pname = "NOVA";
|
||||
version = "r10";
|
||||
inherit ARCH;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "alex-ab";
|
||||
repo = "NOVA";
|
||||
rev = "68c2fb1671e75d811a4787e35b0d0c6cc85815c0";
|
||||
sha256 = "06zxz8hvzqgp8vrh6kv65j0z1m3xfm2ac8ppkv6ql0rivm1rv07s";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
makeFlags = [ "--directory build" ];
|
||||
|
||||
preInstall = "export INS_DIR=$out";
|
||||
|
||||
meta = with stdenv.lib;
|
||||
src.meta // {
|
||||
description =
|
||||
"The NOVA OS Virtualization Architecture is a project aimed at constructing a secure virtualization environment with a small trusted computing base.";
|
||||
homepage = "http://hypervisor.org/";
|
||||
license = licenses.gpl2;
|
||||
maintainers = [ maintainers.ehmry ];
|
||||
};
|
||||
|
||||
}
|
@ -0,0 +1,275 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
{ nixpkgs, mkDhallManifest }:
|
||||
|
||||
let
|
||||
|
||||
inherit (nixpkgs) buildPackages llvmPackages;
|
||||
|
||||
sourceForgeToolchain = nixpkgs.buildPackages.callPackage ./toolchain.nix { };
|
||||
|
||||
stdenvLlvm = let inherit (nixpkgs) stdenv;
|
||||
in assert stdenv.cc.isClang; stdenv;
|
||||
|
||||
stdenvGcc = let
|
||||
env = nixpkgs.stdenvAdapters.overrideCC nixpkgs.stdenv sourceForgeToolchain;
|
||||
in assert env.cc.isGNU; env;
|
||||
|
||||
inherit (stdenvLlvm) lib targetPlatform;
|
||||
specs = with targetPlatform;
|
||||
[ ]
|
||||
|
||||
++ lib.optional is32bit "32bit"
|
||||
|
||||
++ lib.optional is64bit "64bit"
|
||||
|
||||
++ lib.optional isAarch32 "arm"
|
||||
|
||||
++ lib.optional isAarch64 "arm_64"
|
||||
|
||||
++ lib.optional isRiscV "riscv"
|
||||
|
||||
++ lib.optional isx86 "x86"
|
||||
|
||||
++ lib.optional isx86_32 "x86_32"
|
||||
|
||||
++ lib.optional isx86_64 "x86_64";
|
||||
|
||||
toTupConfig = env: attrs:
|
||||
let
|
||||
tupArch = with env.targetPlatform;
|
||||
|
||||
if isAarch32 then
|
||||
"arm"
|
||||
else
|
||||
|
||||
if isAarch64 then
|
||||
"arm64"
|
||||
else
|
||||
|
||||
if isx86_32 then
|
||||
"i386"
|
||||
else
|
||||
|
||||
if isx86_64 then
|
||||
"x86_64"
|
||||
else
|
||||
|
||||
abort "unhandled targetPlatform";
|
||||
|
||||
attrs' = with env; { TUP_ARCH = tupArch; } // attrs;
|
||||
|
||||
in with builtins;
|
||||
env.mkDerivation {
|
||||
name = "tup.config";
|
||||
nativeBuildInputs = with nixpkgs.buildPackages; [
|
||||
binutils
|
||||
pkgconfig
|
||||
which
|
||||
];
|
||||
text = let
|
||||
op = config: name: ''
|
||||
${config}CONFIG_${name}=${getAttr name attrs}
|
||||
'';
|
||||
in foldl' op "" (attrNames attrs);
|
||||
passAsFile = [ "text" ];
|
||||
preferLocalBuild = true;
|
||||
buildCommand = let
|
||||
subst = let
|
||||
vars = [ "AR" "NM" ];
|
||||
f = other: var:
|
||||
other + ''
|
||||
echo CONFIG_${var}=`which ''$${var}` >> $out
|
||||
'';
|
||||
in foldl' f "" vars;
|
||||
utils = let
|
||||
vars = [ "pkg-config" "objcopy" ];
|
||||
f = other: var:
|
||||
other + ''
|
||||
echo CONFIG_${var}=`which ${var}` >> $out
|
||||
'';
|
||||
in foldl' f "" vars;
|
||||
in ''
|
||||
cp $textPath $out
|
||||
${subst}
|
||||
${utils}
|
||||
'';
|
||||
};
|
||||
|
||||
tupConfigGcc = let
|
||||
f = env:
|
||||
let prefix = bin: env.cc.targetPrefix + bin;
|
||||
in {
|
||||
CC = prefix "gcc";
|
||||
CXX = prefix "g++";
|
||||
LD = prefix "ld";
|
||||
OBJCOPY = prefix "objcopy";
|
||||
RANLIB = prefix "ranlib";
|
||||
READELF = prefix "readelf";
|
||||
STRIP = prefix "strip";
|
||||
PKGCONFIG = "${nixpkgs.buildPackages.pkgconfig}/bin/pkg-config";
|
||||
|
||||
IS_GCC = "";
|
||||
LINUX_HEADERS = buildPackages.glibc.dev;
|
||||
};
|
||||
in toTupConfig stdenvGcc (f stdenvGcc);
|
||||
|
||||
tupConfigLlvm = let
|
||||
f = env:
|
||||
let prefix = bin: "${env.cc}/bin/${env.cc.targetPrefix}${bin}";
|
||||
in {
|
||||
CC = prefix "cc";
|
||||
CXX = prefix "c++";
|
||||
LD = prefix "ld";
|
||||
OBJCOPY = prefix "objcopy";
|
||||
OBJDUMP = prefix "objdump";
|
||||
RANLIB = prefix "ranlib";
|
||||
READELF = prefix "readelf";
|
||||
STRIP = prefix "strip";
|
||||
PKGCONFIG = "${nixpkgs.buildPackages.pkgconfig}/bin/pkg-config";
|
||||
|
||||
IS_LLVM = "";
|
||||
LIBCXXABI = llvmPackages.libcxxabi;
|
||||
LIBCXX = llvmPackages.libcxx;
|
||||
LIBUNWIND_BAREMETAL =
|
||||
llvmPackages.libunwind.override { isBaremetal = true; };
|
||||
LIBUNWIND = llvmPackages.libunwind;
|
||||
LINUX_HEADERS = buildPackages.glibc.dev;
|
||||
};
|
||||
in toTupConfig stdenvLlvm (f stdenvLlvm);
|
||||
|
||||
src = nixpkgs.fetchgit {
|
||||
url = "https://git.sr.ht/~ehmry/genode";
|
||||
rev = "42f93ce3da14663575f7f24d299315688facd545";
|
||||
sha256 = "1rjjmq4qx9vsm0cbnr9h5n2gr8zbw1dpnhqjlyfvs44andzps5qd";
|
||||
};
|
||||
|
||||
buildRepo = { env, repo, repoInputs }:
|
||||
env.mkDerivation {
|
||||
pname = repo;
|
||||
version = "19.11";
|
||||
inherit repo specs src;
|
||||
|
||||
nativeBuildInputs = repoInputs;
|
||||
# This is wrong, why does pkg-config not collect buildInputs?
|
||||
|
||||
propagatedNativeBuildInputs = repoInputs;
|
||||
|
||||
depsBuildBuild = with buildPackages; [ llvm pkgconfig tup ];
|
||||
|
||||
tupConfig = if env.cc.isGNU then
|
||||
tupConfigGcc
|
||||
else if env.cc.isClang then
|
||||
tupConfigLlvm
|
||||
else
|
||||
throw "no Tup config for this stdenv";
|
||||
|
||||
configurePhase = ''
|
||||
# Configure Tup
|
||||
set -v
|
||||
install -m666 $tupConfig tup.config
|
||||
echo CONFIG_NIX_OUTPUTS_OUT=$out >> tup.config
|
||||
echo CONFIG_NIX_OUTPUTS_DEV=$out >> tup.config
|
||||
|
||||
# Disable other repos
|
||||
for R in repos/*; do
|
||||
[ "$R" != "repos/$repo" ] && find $R -name Tupfile -delete
|
||||
done
|
||||
|
||||
# Scan repository and generate script
|
||||
tup init
|
||||
tup generate buildPhase.sh
|
||||
|
||||
# Redirect artifacts to Nix store
|
||||
mkdir -p $out/lib $out/include
|
||||
ln -s $out out
|
||||
ln -s $out dev
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
test -d repos/$repo/src/ld && cp -rv repos/$repo/src/ld $out/
|
||||
pushd .
|
||||
set -v
|
||||
source buildPhase.sh
|
||||
set +v
|
||||
popd
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
# Populate the "dev" headers
|
||||
if [ -d "repos/$repo/include" ]; then
|
||||
for DIR in repos/$repo/include; do
|
||||
for SPEC in $specs; do
|
||||
if [ -d $DIR/spec/$SPEC ]; then
|
||||
cp -r $DIR/spec/$SPEC/* $out/include
|
||||
rm -r $DIR/spec/$SPEC
|
||||
fi
|
||||
done
|
||||
rm -rf $DIR/spec
|
||||
cp -r $DIR $out/
|
||||
done
|
||||
fi
|
||||
|
||||
touch $out/.genode
|
||||
for pc in $out/lib/pkgconfig/*.pc; do
|
||||
sed -e "s|^Libs: |Libs: -L$out/lib |" -i $pc
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with env.lib; {
|
||||
description =
|
||||
"The Genode operation system framework (${repo} repository).";
|
||||
homepage = "https://genode.org/";
|
||||
license = licenses.agpl3;
|
||||
maintainers = [ maintainers.ehmry ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
buildRepo' = { ... }@args:
|
||||
let drv = buildRepo ({ env = stdenvGcc; } // args);
|
||||
in { manifest = mkDhallManifest drv; } // drv;
|
||||
|
||||
drvs = rec {
|
||||
|
||||
base = buildRepo' {
|
||||
repo = "base";
|
||||
repoInputs = [ ];
|
||||
};
|
||||
|
||||
base-linux = buildRepo' {
|
||||
repo = "base-linux";
|
||||
repoInputs = [ base ];
|
||||
};
|
||||
|
||||
base-nova = buildRepo' {
|
||||
repo = "base-nova";
|
||||
repoInputs = [ base ];
|
||||
};
|
||||
|
||||
os = buildRepo' {
|
||||
repo = "os";
|
||||
repoInputs = [ base ];
|
||||
};
|
||||
|
||||
gems = buildRepo' {
|
||||
repo = "gems";
|
||||
repoInputs = [ base os ];
|
||||
};
|
||||
|
||||
inherit stdenvGcc stdenvLlvm tupConfigGcc tupConfigLlvm;
|
||||
|
||||
};
|
||||
|
||||
manifest = with builtins;
|
||||
let
|
||||
repoDrvs = filter (drv: typeOf drv == "set" && hasAttr "repo" drv && hasAttr "manifest" drv)
|
||||
(attrValues drvs);
|
||||
records = map (drv: "${drv.repo}=${drv.manifest}") repoDrvs;
|
||||
text = "{" + builtins.concatStringsSep "," records + "}";
|
||||
in nixpkgs.writeTextFile {
|
||||
name = "genode.manifest.dhall";
|
||||
inherit text;
|
||||
};
|
||||
|
||||
in drvs // manifest
|
@ -0,0 +1,75 @@
|
||||
# Shameless plagiarism of Blitz's toolchain expression:
|
||||
# https://github.com/blitz/genode-nix
|
||||
|
||||
#
|
||||
# WARNING: these binaries are from sourceforge and
|
||||
# have not been publicly verified by Genode Labs.
|
||||
#
|
||||
|
||||
{ stdenv, fetchurl, ncurses5, expat, makeWrapper, wrapCC }:
|
||||
|
||||
let
|
||||
cc = stdenv.mkDerivation rec {
|
||||
pname = "genode-toolchain";
|
||||
version = "19.05";
|
||||
|
||||
src = fetchurl ({
|
||||
x86_64-linux = {
|
||||
url =
|
||||
"mirror://sourceforge/project/genode/${pname}/${version}/${pname}-${version}-x86_64.tar.xz";
|
||||
sha256 = "036czy21zk7fvz1y1p67q3d5hgg8rb8grwabgrvzgdsqcv2ls6l9";
|
||||
};
|
||||
}.${stdenv.buildPlatform.system} or (throw
|
||||
"cannot install Genode toolchain on this platform"));
|
||||
|
||||
preferLocalBuild = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
phases = [ "unpackPhase" "fixupPhase" ];
|
||||
|
||||
dontStrip = true;
|
||||
dontPatchELF = true;
|
||||
|
||||
libPath = stdenv.lib.makeLibraryPath [ "$out" stdenv.cc.cc expat ncurses5 ];
|
||||
|
||||
unpackPhase = ''
|
||||
mkdir $out
|
||||
tar xf $src --strip-components=5 -C $out
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
for p in $(find "$out" -type f -executable); do
|
||||
if isELF "$p"; then
|
||||
echo "Patchelfing $p"
|
||||
patchelf "$p"
|
||||
patchelf --set-interpreter $(cat ${stdenv.cc}/nix-support/dynamic-linker) "$p" || true
|
||||
patchelf --set-rpath ${libPath} "$p" || true
|
||||
fi
|
||||
done
|
||||
pushd $out/bin
|
||||
for BIN in $out/bin/genode-aarch64-*; do
|
||||
makeWrapper ''${BIN} aarch64-unknown-genode-''${BIN#$out/bin/genode-aarch64-}
|
||||
done
|
||||
for BIN in $out/bin/genode-arm-*; do
|
||||
makeWrapper ''${BIN} arm-unknown-genode-''${BIN#$out/bin/genode-arm-}
|
||||
done
|
||||
for BIN in $out/bin/genode-riscv-*; do
|
||||
makeWrapper ''${BIN} riscv-unknown-genode-''${BIN#$out/bin/genode-riscv-}
|
||||
done
|
||||
for BIN in $out/bin/genode-x86-*; do
|
||||
makeWrapper ''${BIN} i686-unknown-genode-''${BIN#$out/bin/genode-x86-}
|
||||
makeWrapper ''${BIN} x86_64-unknown-genode-''${BIN#$out/bin/genode-x86-}
|
||||
done
|
||||
popd
|
||||
'';
|
||||
} // {
|
||||
isGNU = true;
|
||||
targetPrefix = "genode-x86-";
|
||||
};
|
||||
|
||||
wrapped = wrapCC cc;
|
||||
|
||||
wrapped' = wrapped.overrideAttrs (attrs: { inherit (cc) targetPrefix; });
|
||||
|
||||
in wrapped'
|
Loading…
Reference in New Issue