nic_bus: reinit at version 0.2

This commit is contained in:
Emery Hemingway 2020-04-05 14:03:51 +05:30
parent 8cdc415417
commit d0ba11aba8
2 changed files with 64 additions and 6 deletions

View File

@ -67,20 +67,22 @@ in rec {
init = genodeSources.make "init";
ssh_client = buildWorld {
name = "ssh_client";
targets = [ "app/ssh_client" ];
portInputs = with genodeSources.ports; [ libc libssh openssl zlib ];
};
bender = buildPackages.callPackage ./bender { };
block_router = callPackage ./block_router { };
dhallGenode = dhallPackages.genode;
nic_bus = callPackage ./nic_bus { };
NOVA = callPackage ./NOVA { };
ssh_client = buildWorld {
name = "ssh_client";
targets = [ "app/ssh_client" ];
portInputs = with genodeSources.ports; [ libc libssh openssl zlib ];
};
solo5 = let drv = callPackage ./solo5 { };
in drv // { tests = drv.tests // { pname = "solo5-tests"; }; };

View File

@ -0,0 +1,56 @@
# SPDX-License-Identifier: CC0-1.0
{ stdenv, fetchgit, tup }:
let
tupArch = with stdenv.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";
toTupConfig = attrs:
with builtins;
let op = config: name: "${config}CONFIG_${name}=${attrs.${name}} ";
in foldl' op "" (attrNames attrs);
in stdenv.mkDerivation rec {
pname = "nic_bus";
version = "2.0";
src = fetchgit {
url = "https://git.sr.ht/~ehmry/nic_bus";
rev = "v" + version;
sha256 = "DrgZHkUEjkHmSfOqSetGqU/nLl8OqNM0zaJjOout5VY=";
};
nativeBuildInputs = [ tup ];
configurePhase = ''
# Scan repository and generate script
tup init
tup generate buildPhase.sh
'';
buildPhase = ''
pushd .
set -v
source buildPhase.sh
set +v
popd
'';
installPhase = "install -Dm755 {.,$out}/${pname}";
meta = with stdenv.lib; {
license = licenses.agpl3;
maintainers = [ maintainers.ehmry ];
};
}