genode-depot/flake.nix

50 lines
1.3 KiB
Nix
Raw Normal View History

2019-11-10 14:58:22 +01:00
{
description = "Cache of pre-built Genode binaries";
edition = 201909;
2020-01-24 17:19:01 +01:00
outputs = { self, nixpkgs }:
2019-11-10 14:58:22 +01:00
let
2020-01-15 19:06:25 +01:00
localSystem = "x86_64-linux";
localPackages = nixpkgs.legacyPackages.${localSystem};
2019-11-10 14:58:22 +01:00
unpack = baseUrl:
{ name, value }: {
inherit name;
2020-01-15 19:06:25 +01:00
value = localPackages.stdenvNoCC.mkDerivation {
2019-11-10 14:58:22 +01:00
pname = name;
inherit (value) version;
preferLocalBuild = true;
2020-01-15 19:06:25 +01:00
src = localPackages.fetchurl {
2019-11-10 14:58:22 +01:00
url = "${baseUrl}${name}/${value.version}.tar.xz";
inherit (value) sha256;
};
dontConfigure = true;
dontBuild = true;
installPhase = ''
find . -type f | while read FILE; do
install -Dm444 -t $out $FILE
2019-11-10 14:58:22 +01:00
done
'';
meta = {
license = [ "LicenseRef-Genode" ];
downloadPage = "${baseUrl}${name}/";
};
};
};
expand = baseUrl: listing:
builtins.listToAttrs (map (unpack baseUrl) listing);
pkgs = expand "http://depot.genode.org/genodelabs/bin/x86_64/"
2019-11-10 14:58:22 +01:00
(import ./genodelabs-list.nix);
2019-12-02 17:55:04 +01:00
in {
packages = {
x86_64-linux-x86_64-genode = pkgs;
x86_64-linux = pkgs;
};
checks = self.packages;
2019-11-28 15:23:55 +01:00
};
2019-11-10 14:58:22 +01:00
}