Genode Packages collection https://git.sr.ht/~ehmry/genodepkgs/
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.

default.nix 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. { system, self, nixpkgs, nixpkgsLocal, packages }:
  2. let
  3. dhallApps = let
  4. mkApp = { drv, name ? drv.pname or drv.name, exe ? name }: {
  5. inherit name;
  6. value = {
  7. type = "app";
  8. program = "${drv}/bin/${exe}";
  9. };
  10. };
  11. in builtins.listToAttrs [
  12. (mkApp { drv = nixpkgsLocal.dhall; })
  13. (mkApp {
  14. drv = nixpkgsLocal.dhall-bash;
  15. name = "dhall-to-bash";
  16. })
  17. (mkApp {
  18. drv = nixpkgsLocal.dhall-json;
  19. name = "dhall-to-json";
  20. })
  21. (mkApp {
  22. drv = nixpkgsLocal.dhall-json;
  23. name = "json-to-dhall";
  24. })
  25. (mkApp {
  26. drv = nixpkgsLocal.dhall-json;
  27. name = "dhall-to-yaml";
  28. })
  29. (mkApp {
  30. drv = nixpkgsLocal.dhall-json;
  31. name = "yaml-to-dhall";
  32. })
  33. ];
  34. in dhallApps // {
  35. genode-make = {
  36. type = "app";
  37. program = nixpkgs.buildPackages.callPackage ./genode-make { };
  38. };
  39. linux-image = let
  40. drv = import ./linux-image {
  41. apps = self;
  42. inherit nixpkgs packages;
  43. };
  44. in {
  45. type = "app";
  46. program = "${drv}/bin/linux-image";
  47. };
  48. generate-manifest = let
  49. drv = import ./generate-manifest {
  50. stdenv = packages.stdenv;
  51. inherit nixpkgs;
  52. };
  53. in {
  54. type = "app";
  55. program = "${drv}/bin/generate-manifest";
  56. };
  57. render-init = let
  58. drv = import ./render-init {
  59. apps = self;
  60. inherit nixpkgs packages;
  61. };
  62. in {
  63. type = "app";
  64. program = "${drv}/bin/render-init";
  65. };
  66. } // (if system == "x86_64-genode" then {
  67. hw-image = let
  68. drv = import ./hw-image {
  69. stdenv = packages.stdenv;
  70. apps = self;
  71. inherit nixpkgs packages;
  72. };
  73. in {
  74. type = "app";
  75. program = "${drv}/bin/hw-image";
  76. function = attrs: bootDesc:
  77. nixpkgs.runCommand "image.elf" attrs
  78. ''XDG_CACHE_HOME=$TMPDIR ${drv}/bin/hw-image "${bootDesc}" > $out'';
  79. };
  80. hw-iso = let
  81. drv = import ./hw-iso {
  82. stdenv = packages.stdenv;
  83. inherit nixpkgs packages;
  84. inherit (self) hw-image;
  85. };
  86. in {
  87. type = "app";
  88. program = "${drv}/bin/hw-iso";
  89. function = attrs: bootDesc:
  90. nixpkgs.runCommand "hw.iso" attrs
  91. ''XDG_CACHE_HOME=$TMPDIR ${drv}/bin/hw-iso "${bootDesc}" > $out'';
  92. };
  93. nova-image = let
  94. drv = import ./nova-image {
  95. stdenv = packages.stdenv;
  96. apps = self;
  97. inherit nixpkgs packages;
  98. };
  99. in {
  100. type = "app";
  101. program = "${drv}/bin/nova-image";
  102. };
  103. nova-iso = let
  104. drv = import ./nova-iso {
  105. stdenv = packages.stdenv;
  106. inherit nixpkgs packages;
  107. inherit (self) nova-image;
  108. };
  109. in {
  110. type = "app";
  111. program = "${drv}/bin/nova-iso";
  112. function = attrs: bootDesc:
  113. nixpkgs.runCommand "nova.iso" attrs
  114. ''XDG_CACHE_HOME=$TMPDIR ${drv}/bin/nova-iso "${bootDesc}" > $out'';
  115. };
  116. } else
  117. { })