Permalink
Browse files

Merge branch 'master' of github.com:input-output-hk/plutus into plutu…

…s-core/cabal-compliance
  • Loading branch information...
vmchale committed Dec 6, 2018
2 parents e25452a + 697abc7 commit ba566298bf554dc01cfc1768cec9670310364421
Showing with 20,574 additions and 477 deletions.
  1. +3 −0 .gitignore
  2. +1 −0 .hindent.yaml
  3. +1 −1 .hlint.yaml
  4. +10 −0 cabal.project
  5. +58 −6 default.nix
  6. +7 −1 lib.nix
  7. +430 −12 pkgs/default.nix
  8. +65 −0 plutus-playground/README.md
  9. +57 −0 plutus-playground/deployment/README.md
  10. +3 −0 plutus-playground/deployment/nixops/.gitignore
  11. +40 −0 plutus-playground/deployment/nixops/default-machine.nix
  12. +12 −0 plutus-playground/deployment/nixops/default.nix
  13. +15 −0 plutus-playground/deployment/nixops/network.nix
  14. +16 −0 plutus-playground/deployment/nixops/overlays.nix
  15. +86 −0 plutus-playground/deployment/nixops/playground.nix
  16. +181 −0 plutus-playground/deployment/terraform/loadbalancing.tf
  17. +60 −0 plutus-playground/deployment/terraform/machines.tf
  18. +14 −0 plutus-playground/deployment/terraform/main.tf
  19. +288 −0 plutus-playground/deployment/terraform/network.tf
  20. +80 −0 plutus-playground/deployment/terraform/nixops.tf
  21. +125 −0 plutus-playground/deployment/terraform/playground.tf
  22. +47 −0 plutus-playground/deployment/terraform/ssh_config.tf
  23. +43 −0 plutus-playground/deployment/terraform/templates/bastion_configuration.nix
  24. +8 −0 plutus-playground/deployment/terraform/templates/default_configuration.nix
  25. +36 −0 plutus-playground/deployment/terraform/templates/nixops_configuration.nix
  26. +10 −0 plutus-playground/deployment/terraform/templates/ssh-config
  27. +5 −0 plutus-playground/deployment/terraform/terraform.tfvars.example
  28. +107 −0 plutus-playground/deployment/terraform/variables.tf
  29. +8 −0 plutus-playground/plutus-playground-client/.gitignore
  30. +100 −0 plutus-playground/plutus-playground-client/bower-packages.nix
  31. +39 −0 plutus-playground/plutus-playground-client/bower.json
  32. +60 −0 plutus-playground/plutus-playground-client/default.nix
  33. +9 −0 plutus-playground/plutus-playground-client/entry.js
  34. +5 −0 plutus-playground/plutus-playground-client/nixpkgs-src.json
  35. +37 −0 plutus-playground/plutus-playground-client/package.json
  36. +181 −0 plutus-playground/plutus-playground-client/src/Action.purs
  37. +60 −0 plutus-playground/plutus-playground-client/src/AjaxUtils.purs
  38. +236 −0 plutus-playground/plutus-playground-client/src/Bootstrap.purs
  39. +183 −0 plutus-playground/plutus-playground-client/src/Chain.purs
  40. +113 −0 plutus-playground/plutus-playground-client/src/Data/JsonSchema.purs
  41. +16 −0 plutus-playground/plutus-playground-client/src/Data/RawJson.purs
  42. +115 −0 plutus-playground/plutus-playground-client/src/Editor.purs
  43. +27 −0 plutus-playground/plutus-playground-client/src/Icons.purs
  44. +29 −0 plutus-playground/plutus-playground-client/src/Main.purs
  45. +327 −0 plutus-playground/plutus-playground-client/src/MainFrame.purs
  46. +20 −0 plutus-playground/plutus-playground-client/src/StaticData.purs
  47. +229 −0 plutus-playground/plutus-playground-client/src/Types.purs
  48. +109 −0 plutus-playground/plutus-playground-client/src/Wallet.purs
  49. +22 −0 plutus-playground/plutus-playground-client/static/index.html
  50. +242 −0 plutus-playground/plutus-playground-client/static/main.scss
  51. +142 −0 plutus-playground/plutus-playground-client/static/variables.scss
  52. +44 −0 plutus-playground/plutus-playground-client/test/BridgeTests.purs
  53. +4 −0 plutus-playground/plutus-playground-client/test/Main.js
  54. +21 −0 plutus-playground/plutus-playground-client/test/Main.purs
  55. +52 −0 plutus-playground/plutus-playground-client/test/TypesTests.purs
  56. +25 −0 plutus-playground/plutus-playground-client/test/evaluation_error1.json
  57. +129 −0 plutus-playground/plutus-playground-client/test/evaluation_response1.json
  58. +98 −0 plutus-playground/plutus-playground-client/webpack.config.js
  59. +5,306 −0 plutus-playground/plutus-playground-client/yarn.lock
  60. +7,187 −0 plutus-playground/plutus-playground-client/yarn.nix
  61. +11 −0 plutus-playground/plutus-playground-lib/LICENSE
  62. +3 −0 plutus-playground/plutus-playground-lib/Setup.hs
  63. +80 −0 plutus-playground/plutus-playground-lib/plutus-playground-lib.cabal
  64. +156 −0 plutus-playground/plutus-playground-lib/src/Playground/API.hs
  65. +22 −0 plutus-playground/plutus-playground-lib/src/Playground/Contract.hs
  66. +244 −0 plutus-playground/plutus-playground-lib/src/Playground/Interpreter/Util.hs
  67. +50 −0 plutus-playground/plutus-playground-lib/src/Playground/TH.hs
  68. +60 −0 plutus-playground/plutus-playground-lib/tests/Spec.hs
  69. +2 −0 plutus-playground/plutus-playground-server/.gitignore
  70. +11 −0 plutus-playground/plutus-playground-server/LICENSE
  71. +3 −0 plutus-playground/plutus-playground-server/Setup.hs
  72. +82 −0 plutus-playground/plutus-playground-server/app/Main.hs
  73. +213 −0 plutus-playground/plutus-playground-server/app/PSGenerator.hs
  74. +62 −0 plutus-playground/plutus-playground-server/app/Webserver.hs
  75. +165 −0 plutus-playground/plutus-playground-server/plutus-playground-server.cabal
  76. +207 −0 plutus-playground/plutus-playground-server/src/Playground/Interpreter.hs
  77. +132 −0 plutus-playground/plutus-playground-server/src/Playground/Server.hs
  78. +18 −0 plutus-playground/plutus-playground-server/src/Playground/Usecases.hs
  79. +510 −0 plutus-playground/plutus-playground-server/test/Playground/APISpec.hs
  80. +87 −0 plutus-playground/plutus-playground-server/test/Playground/UsecasesSpec.hs
  81. +1 −0 plutus-playground/plutus-playground-server/test/Spec.hs
  82. +189 −0 plutus-playground/plutus-playground-server/usecases/CrowdFunding.hs
  83. +66 −0 plutus-playground/plutus-playground-server/usecases/Game.hs
  84. +46 −0 plutus-playground/plutus-playground-server/usecases/Messages.hs
  85. +150 −0 plutus-playground/plutus-playground-server/usecases/Vesting.hs
  86. +1 −1 plutus-tx-plugin/plutus-tx-plugin.cabal
  87. +18 −23 plutus-tx-plugin/src/Language/PlutusTx/Lift.hs
  88. +25 −25 plutus-tx-plugin/src/Language/PlutusTx/Lift/{LiftPir.hs → Class.hs}
  89. +17 −17 plutus-tx-plugin/src/Language/PlutusTx/Lift/Instances.hs
  90. +2 −2 plutus-tx-plugin/src/Language/PlutusTx/Plugin.hs
  91. +11 −11 plutus-tx-plugin/test/Lift/Spec.hs
  92. +1 −1 plutus-tx-plugin/test/Plugin/Spec.hs
  93. +87 −13 plutus-tx/src/Language/PlutusTx/Prelude.hs
  94. +3 −3 plutus-tx/tutorial/Tutorial.md
  95. +1 −1 plutus-tx/tutorial/tutorial-doctests.hs
  96. +1 −0 plutus-use-cases/README.md
  97. +0 −3 plutus-use-cases/plutus-use-cases.cabal
  98. +16 −0 plutus-use-cases/src/Language/PlutusTx/Coordination/Contracts.hs
  99. +9 −9 plutus-use-cases/src/Language/PlutusTx/Coordination/Contracts/CrowdFunding.hs
  100. +14 −14 plutus-use-cases/src/Language/PlutusTx/Coordination/Contracts/Future.hs
  101. +11 −11 plutus-use-cases/src/Language/PlutusTx/Coordination/Contracts/Swap.hs
  102. +8 −9 plutus-use-cases/src/Language/PlutusTx/Coordination/Contracts/Vesting.hs
  103. +0 −80 plutus-use-cases/src/Language/PlutusTx/Validation.hs
  104. +0 −94 plutus-use-cases/src/Language/PlutusTx/Validation/TH.hs
  105. +4 −2 release.nix
  106. +1 −1 shell.nix
  107. +18 −0 stack.yaml
  108. +4 −0 wallet-api/README.md
  109. +2 −3 wallet-api/src/Ledger/Index.hs
  110. +50 −42 wallet-api/src/Ledger/Types.hs
  111. +237 −73 wallet-api/src/Ledger/Validation.hs
  112. +32 −2 wallet-api/src/Wallet/API.hs
  113. +4 −2 wallet-api/src/Wallet/Emulator/Client.hs
  114. +9 −1 wallet-api/src/Wallet/Emulator/Http.hs
  115. +21 −3 wallet-api/src/Wallet/Emulator/Types.hs
  116. +7 −7 wallet-api/src/Wallet/Generators.hs
  117. +99 −0 wallet-api/src/Wallet/Graph.hs
  118. +3 −3 wallet-api/test/Spec.hs
  119. +1 −0 wallet-api/tutorial/Tutorial.lhs
  120. +267 −0 wallet-api/tutorial/Tutorial.md
  121. +12 −0 wallet-api/tutorial/tutorial-doctests.hs
  122. +25 −1 wallet-api/wallet-api.cabal
@@ -29,3 +29,6 @@ result*
*.pdf
*.gz
*.synctex(busy)
.terraform
*.tfvars
@@ -0,0 +1 @@
indent-size: 4
@@ -2,7 +2,7 @@
- functions:
- {name: unsafePerformIO, within: [PlutusPrelude, Language.PlutusCore.Generators.Internal.Entity, Language.PlutusCore.Constant.Dynamic.Call, Language.PlutusCore.Constant.Dynamic.Emit, Language.PlutusCore.Constant.Dynamic.Instances, Language.PlutusTx.Plugin, Language.PlutusTx.Evaluation]}
- {name: error, within: [Main, PlutusPrelude, Language.PlutusCore.StdLib.Meta, Evaluation.Constant.Success, Language.PlutusCore.Constant.Apply, Language.PlutusCore.Constant.Typed, Language.PlutusCore.Evaluation.CkMachine, Language.PlutusCore.TypeSynthesis, Language.PlutusCore.Generators.Internal.Entity, Language.PlutusCore.Generators.Internal.Utils, Language.PlutusCore.Constant.Make, Language.PlutusCore.TH, Language.PlutusTx.Utils, Language.PlutusIR.Compiler.Datatype]}
- {name: undefined, within: [Language.PlutusCore.Constant.Apply, Language.PlutusTx.Lift.LiftPir, Language.PlutusTx.Lift.Instances]}
- {name: undefined, within: [Language.PlutusCore.Constant.Apply, Language.PlutusTx.Lift.Class, Language.PlutusTx.Lift.Instances]}
- {name: fromJust, within: [Language.PlutusTx.Lift]}
- {name: foldl, within: []}
- {name: traceShowId, within: []} # for debugging only, should not be merged to master
@@ -6,17 +6,27 @@ packages: language-plutus-core
plutus-tx-plugin
plutus-use-cases
plutus-ir
plutus-playground/plutus-playground-server
plutus-playground/plutus-playground-lib
optimization: 2
constraints: language-plutus-core +development
, wallet-api +development
, plutus-tx-plugin +development
, plutus-exe +development
, plutus-core-interpreter +development
, plutus-ir +development
, plutus-playground-server +development
, plutus-playground-lib +development
tests: true
benchmarks: true
documentation: true
allow-boot-library-installs:
true
allow-newer:
cborg:containers
program-options
alex-options: -g
happy-options: -gcsa
@@ -71,7 +71,8 @@ let
filter = localLib.isPlutus;
};
customOverlays = optional forceError errorOverlay;
packages = self: ({
purescriptNixpkgs = import (localLib.iohkNix.fetchNixpkgs ./plutus-playground/plutus-playground-client/nixpkgs-src.json) {};
packages = self: (rec {
inherit pkgs localLib;
# This is the stackage LTS plus overrides, plus the plutus
@@ -83,33 +84,84 @@ let
pkgsGenerated = ./pkgs;
filter = localLib.isPlutus;
filterOverrides = {
# split check is broken for things with test tool dependencies
splitCheck = let
pkgList = pkgs.lib.remove "plutus-tx" localLib.plutusPkgList;
in name: builtins.elem name pkgList;
dontSplit = [
# Broken for things with test tool dependencies
"wallet-api"
"plutus-tx"
# Broken for things which pick up other files at test runtime
"plutus-playground-server"
];
# Split only local packages not in the don't split list
doSplit = builtins.filter (name: !(builtins.elem name dontSplit)) localLib.plutusPkgList;
in name: builtins.elem name doSplit;
};
requiredOverlay = ./nix/overlays/required.nix;
ghc = pkgs.haskell.compiler.ghc843;
};
# the playground uses ghc at runtime so it needs one packaged up with the dependencies it needs in one place
playgroundGhc = haskellPackages.ghcWithPackages (ps: [
haskellPackages.plutus-playground-server
haskellPackages.plutus-playground-lib
haskellPackages.plutus-use-cases
]);
localPackages = localLib.getPackages {
inherit (self) haskellPackages; filter = localLib.isPlutus;
};
tests = {
shellcheck = pkgs.callPackage localLib.iohkNix.tests.shellcheck { inherit src; };
hlint = pkgs.callPackage localLib.iohkNix.tests.hlint {
inherit src;
projects = localLib.plutusPkgList;
projects = let
fixPlaygroundServer = v: if v != "plutus-playground-server" then v else "plutus-playground/plutus-playground-server";
fixPlaygroundLib = v: if v != "plutus-playground-lib" then v else "plutus-playground/plutus-playground-lib";
in
map (localLib.comp fixPlaygroundServer fixPlaygroundLib) localLib.plutusHaskellPkgList;
};
stylishHaskell = pkgs.callPackage localLib.iohkNix.tests.stylishHaskell {
inherit (self.haskellPackages) stylish-haskell;
inherit src;
};
};
plutus-server-invoker = pkgs.stdenv.mkDerivation {
name = "plutus-server-invoker";
unpackPhase = "true";
buildInputs = [ playgroundGhc haskellPackages.plutus-playground-server pkgs.makeWrapper ];
buildPhase = ''
# We need to provide the ghc interpreter (hint) with the location of the ghc lib dir and the package db
mkdir -p $out/bin
ln -s ${haskellPackages.plutus-playground-server}/bin/plutus-playground-server $out/bin/plutus-playground-server
wrapProgram $out/bin/plutus-playground-server --set GHC_LIB_DIR "${playgroundGhc}/lib/ghc-8.4.3" --set GHC_PACKAGE_PATH "${playgroundGhc}/lib/ghc-8.4.3/package.conf.d"
'';
installPhase = "echo nothing to install";
};
plutus-playground-purescript = pkgs.stdenv.mkDerivation {
name = "plutus-playground-purescript";
unpackPhase = "true";
buildInputs = [ haskellPackages.plutus-playground-server ];
buildPhase = ''
mkdir $out
${haskellPackages.plutus-playground-server}/bin/plutus-playground-server psgenerator $out
'';
installPhase = "echo nothing to install";
};
inherit (pkgs.callPackage ./plutus-playground/plutus-playground-client {
pkgs = purescriptNixpkgs;
psSrc = plutus-playground-purescript;
}) plutus-playground-client;
docs = {
plutus-core-spec = pkgs.callPackage ./plutus-core-spec {};
lazy-machine = pkgs.callPackage ./docs/fomega/lazy-machine {};
};
plutus-playground-docker = pkgs.dockerTools.buildImage {
name = "plutus-playground-docker";
contents = [ plutus-playground-client plutus-server-invoker ];
config = {
Cmd = ["${plutus-server-invoker}/bin/plutus-playground-server" "webserver" "-b" "0.0.0.0" "-p" "8080" "${plutus-playground-client}"];
};
};
inherit (pkgs) stack2nix;
});
in
@@ -25,6 +25,10 @@ let
plutusPkgList = [
"language-plutus-core"
"plutus-core-interpreter"
"plutus-playground-server"
"plutus-playground-lib"
"plutus-playground-client"
"plutus-server-invoker"
"plutus-exe"
"plutus-ir"
"plutus-tx"
@@ -33,10 +37,12 @@ let
"wallet-api"
];
plutusHaskellPkgList = lib.filter (v: v != "plutus-playground-client" && v != "plutus-server-invoker") plutusPkgList;
isPlutus = name: builtins.elem name plutusPkgList;
withDevTools = env: env.overrideAttrs (attrs: { nativeBuildInputs = attrs.nativeBuildInputs ++ [ pkgs.cabal-install pkgs.haskellPackages.ghcid ]; });
comp = f: g: (v: f(g v));
in lib // {
inherit getPackages iohkNix isPlutus plutusPkgList withDevTools pkgs nixpkgs;
inherit getPackages iohkNix isPlutus plutusHaskellPkgList plutusPkgList withDevTools pkgs nixpkgs comp;
}
Oops, something went wrong.

0 comments on commit ba56629

Please sign in to comment.