Nix flake of prebuilt Genode binaries
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

flake.nix 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {
  2. description = "Cache of pre-built Genode binaries";
  3. edition = 201909;
  4. outputs = { self, nixpkgs }:
  5. let
  6. localSystem = "x86_64-linux";
  7. localPackages = nixpkgs.legacyPackages.${localSystem};
  8. unpack = baseUrl:
  9. { name, value }: {
  10. inherit name;
  11. value = localPackages.stdenvNoCC.mkDerivation {
  12. pname = name;
  13. inherit (value) version;
  14. preferLocalBuild = true;
  15. src = localPackages.fetchurl {
  16. url = "${baseUrl}${name}/${value.version}.tar.xz";
  17. inherit (value) sha256;
  18. };
  19. dontConfigure = true;
  20. dontBuild = true;
  21. installPhase = ''
  22. find . -type f | while read FILE; do
  23. install -Dm444 -t $out $FILE
  24. done
  25. '';
  26. meta = {
  27. license = [ "LicenseRef-Genode" ];
  28. downloadPage = "${baseUrl}${name}/";
  29. };
  30. };
  31. };
  32. expand = baseUrl: listing:
  33. builtins.listToAttrs (map (unpack baseUrl) listing);
  34. pkgs = expand "http://depot.genode.org/genodelabs/bin/x86_64/"
  35. (import ./genodelabs-list.nix);
  36. in {
  37. packages = {
  38. x86_64-linux-x86_64-genode = pkgs;
  39. x86_64-linux = pkgs;
  40. };
  41. checks = self.packages;
  42. };
  43. }