Neovim IDE in a NixOS Docker Container
docker run --volumes-from=nix -it \
-v $(pwd):/home \
-w /home \
--name <change-me> \
-p 9005:9005 \
-p 3000:3000 \| with import <nixpkgs> {}; | |
| # with pkgs; | |
| stdenv.mkDerivation { | |
| name = "dapp_monkey"; | |
| buildInputs = [python37 nodejs]; | |
| shellHook = '' | |
| npm install body-parser express morgan nodemon web3 |
| with import <nixpkgs> {}; | |
| # with pkgs; | |
| stdenv.mkDerivation { | |
| name = "ipfsenv"; | |
| buildInputs = [ipfs]; | |
| shellHook = '' | |
| ipfs init |
| pragma solidity >=0.4.21 <0.7.0; | |
| // It's important to avoid vulnerabilities due to numeric overflow bugs | |
| // OpenZeppelin's SafeMath library, when used correctly, protects agains such bugs | |
| // More info: https://www.nccgroup.trust/us/about-us/newsroom-and-events/blog/2018/\ | |
| // november/smart-contract-insecurity-bad-arithmetic/ | |
| import "@openzeppelin/contracts/math/SafeMath.sol"; | |
| import "@Openzeppelin/contracts/access/Ownable.sol"; |
| {-# LANGUAGE OverloadedStrings #-} | |
| module Example where | |
| import Language.Marlowe | |
| main :: IO () | |
| main = print . pretty $ contract | |
| {- Define a contract, Close is the simplest contract which just ends the contract straight away |