@ -1,4 +1,4 @@
{ nixpkgs , addManifest }:
{ nixpkgs }:
let
genodeSources = let
@ -94,43 +94,41 @@ let
buildUpstream = { name , targets , portInputs ? [ ] , nativeBuildInputs ? [ ]
, . . . } @ extraAttrs :
let
drv = stdenv' . mkDerivation ( extraAttrs // {
pname = name ;
inherit ( genodeSources ) version ;
inherit targets ;
dontUnpack = true ;
nativeBuildInputs = with nixpkgs . buildPackages ;
[ binutils bison flex stdenv . cc tcl which ] ++ nativeBuildInputs ;
enableParallelBuilding = true ;
configurePhase = let
linkPorts = toString
( builtins . map ( drv : " l n - s v ${ drv } / * c o n t r i b / ; " ) portInputs ) ;
in ''
runHook preConfigure
export CONTRIB_DIR = $ NIX_BUILD_TOP/contrib
export BUILD_DIR = $ NIX_BUILD_TOP/build
$ { genodeSources } /tool/create_builddir $ { arch }
substituteInPlace build/etc/build.conf \
- - replace " # R E P O S I T O R I E S " " R E P O S I T O R I E S "
mkdir $ CONTRIB_DIR ; $ { linkPorts }
runHook postConfigure
'' ;
makeFlags = [ " - C b u i l d " ] ++ targets ;
installPhase = ''
runHook preInstall
find build/bin - name ' * . xsd' - delete
find build/bin - follow - type f - exec install - Dt $ out ' { } ' \ ;
runHook postInstall
'' ;
} ) ;
in addManifest drv ;
stdenv' . mkDerivation ( extraAttrs // {
pname = name ;
inherit ( genodeSources ) version ;
inherit targets ;
dontUnpack = true ;
nativeBuildInputs = with nixpkgs . buildPackages ;
[ binutils bison flex stdenv . cc tcl which ] ++ nativeBuildInputs ;
enableParallelBuilding = true ;
configurePhase = let
linkPorts = toString
( builtins . map ( drv : " l n - s v ${ drv } / * c o n t r i b / ; " ) portInputs ) ;
in ''
runHook preConfigure
export CONTRIB_DIR = $ NIX_BUILD_TOP/contrib
export BUILD_DIR = $ NIX_BUILD_TOP/build
$ { genodeSources } /tool/create_builddir $ { arch }
substituteInPlace build/etc/build.conf \
- - replace " # R E P O S I T O R I E S " " R E P O S I T O R I E S "
mkdir $ CONTRIB_DIR ; $ { linkPorts }
runHook postConfigure
'' ;
makeFlags = [ " - C b u i l d " ] ++ targets ;
installPhase = ''
runHook preInstall
find build/bin - name ' * . xsd' - delete
find build/bin - follow - type f - exec install - Dt $ out ' { } ' \ ;
runHook postInstall
'' ;
} ) ;
buildOverrides = import ./targets.nix {
inherit ( nixpkgs ) buildPackages ;