-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from mlabs-haskell/bladyjoker/plutustx-flakep…
…arts Enable PlutusTx.Eq code generation plus massive Nix flake-partsify effort
- Loading branch information
Showing
67 changed files
with
1,976 additions
and
1,614 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
use flake ..#dev-protos | ||
use flake ..#dev-api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,57 @@ | ||
{ pkgs, pbnix-lib, commonTools, shellHook }: | ||
rec { | ||
devShell = pkgs.mkShell { | ||
name = "protos-env"; | ||
buildInputs = [ | ||
pkgs.protobuf | ||
pkgs.haskellPackages.proto-lens-protoc | ||
pkgs.protoc-gen-doc | ||
] ++ builtins.attrValues commonTools; | ||
{ inputs, ... }: | ||
{ | ||
perSystem = { pkgs, system, config, ... }: | ||
let | ||
pbnix-lib = inputs.protobufs-nix.lib.${system}; | ||
in | ||
rec { | ||
|
||
inherit shellHook; | ||
}; | ||
devShells.dev-api = pkgs.mkShell { | ||
name = "protos-env"; | ||
buildInputs = [ | ||
pkgs.protobuf | ||
pkgs.haskellPackages.proto-lens-protoc | ||
pkgs.protoc-gen-doc | ||
] ++ config.settings.shell.tools; | ||
|
||
packages = { | ||
lambda-buffers-lang-hs-pb = pbnix-lib.haskellProto { | ||
inherit pkgs; | ||
src = ./.; | ||
proto = "lang.proto"; | ||
cabalPackageName = "lambda-buffers-lang-pb"; | ||
}; | ||
shellHook = config.settings.shell.hook; | ||
}; | ||
|
||
lambda-buffers-compiler-hs-pb = pbnix-lib.haskellProto { | ||
inherit pkgs; | ||
src = ./.; | ||
proto = "compiler.proto"; | ||
cabalBuildDepends = [ packages.lambda-buffers-lang-hs-pb ]; | ||
cabalPackageName = "lambda-buffers-compiler-pb"; | ||
}; | ||
packages = { | ||
lambda-buffers-lang-hs-pb = pbnix-lib.haskellProto { | ||
inherit pkgs; | ||
src = ./.; | ||
proto = "lang.proto"; | ||
cabalPackageName = "lambda-buffers-lang-pb"; | ||
}; | ||
|
||
lambda-buffers-codegen-hs-pb = pbnix-lib.haskellProto { | ||
inherit pkgs; | ||
src = ./.; | ||
proto = "codegen.proto"; | ||
cabalBuildDepends = [ packages.lambda-buffers-lang-hs-pb ]; | ||
cabalPackageName = "lambda-buffers-codegen-pb"; | ||
}; | ||
lambda-buffers-compiler-hs-pb = pbnix-lib.haskellProto { | ||
inherit pkgs; | ||
src = ./.; | ||
proto = "compiler.proto"; | ||
cabalBuildDepends = [ packages.lambda-buffers-lang-hs-pb ]; | ||
cabalPackageName = "lambda-buffers-compiler-pb"; | ||
}; | ||
|
||
lambda-buffers-codegen-hs-pb = pbnix-lib.haskellProto { | ||
inherit pkgs; | ||
src = ./.; | ||
proto = "codegen.proto"; | ||
cabalBuildDepends = [ packages.lambda-buffers-lang-hs-pb ]; | ||
cabalPackageName = "lambda-buffers-codegen-pb"; | ||
}; | ||
|
||
lambda-buffers-api-docs = pkgs.stdenv.mkDerivation { | ||
src = ./.; | ||
name = "lambdabuffers-api-docs"; | ||
buildInputs = [ | ||
pkgs.protobuf | ||
]; | ||
buildPhase = '' | ||
mkdir $out; | ||
protoc --plugin=${pkgs.protoc-gen-doc}/bin/protoc-gen-doc lang.proto compiler.proto codegen.proto --doc_out=$out --doc_opt=markdown,api.md; | ||
''; | ||
lambda-buffers-api-docs = pkgs.stdenv.mkDerivation { | ||
src = ./.; | ||
name = "lambdabuffers-api-docs"; | ||
buildInputs = [ | ||
pkgs.protobuf | ||
]; | ||
buildPhase = '' | ||
mkdir $out; | ||
protoc --plugin=${pkgs.protoc-gen-doc}/bin/protoc-gen-doc lang.proto compiler.proto codegen.proto --doc_out=$out --doc_opt=markdown,api.md; | ||
''; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,28 @@ | ||
{ pkgs, commonTools, shellHook }: | ||
pkgs.mkShell { | ||
name = "experimental-env"; | ||
buildInputs = [ | ||
pkgs.dhall | ||
pkgs.dhall-lsp-server | ||
pkgs.dhall-json | ||
_: { | ||
perSystem = { pkgs, config, ... }: | ||
{ | ||
|
||
(pkgs.haskellPackages.ghcWithPackages (pkgs: [ | ||
pkgs.text | ||
pkgs.unification-fd | ||
pkgs.HUnit | ||
])) | ||
pkgs.haskell-language-server | ||
devShells.dev-experimental = pkgs.mkShell { | ||
name = "experimental-env"; | ||
buildInputs = [ | ||
pkgs.dhall | ||
pkgs.dhall-lsp-server | ||
pkgs.dhall-json | ||
|
||
pkgs.protobuf | ||
pkgs.haskellPackages.proto-lens-protoc | ||
pkgs.swiPrologWithGui | ||
] ++ builtins.attrValues commonTools; | ||
(pkgs.haskellPackages.ghcWithPackages (pkgs: [ | ||
pkgs.text | ||
pkgs.unification-fd | ||
pkgs.HUnit | ||
])) | ||
pkgs.haskell-language-server | ||
|
||
inherit shellHook; | ||
pkgs.protobuf | ||
pkgs.haskellPackages.proto-lens-protoc | ||
pkgs.swiPrologWithGui | ||
] ++ config.settings.shell.tools; | ||
|
||
shellHook = config.settings.shell.hook; | ||
}; | ||
|
||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# TODO(bladyjoker): Using overlayAttrs here as a hack to share functions -.- Do this properly. | ||
{ inputs, ... }: { | ||
imports = [ | ||
inputs.flake-parts.flakeModules.easyOverlay # Adds perSystem.overlayAttrs | ||
]; | ||
perSystem = { pkgs, ... }: | ||
{ | ||
|
||
overlayAttrs = { | ||
extras = { | ||
purescriptFlake = import ./flake-purescript.nix pkgs; | ||
haskellData = import ./haskell-data.nix pkgs; | ||
}; | ||
}; | ||
|
||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# TODO(bladyjoker): Using overlayAttrs here as a hack to share functions -.- Do this properly. | ||
{ inputs, ... }: { | ||
imports = [ | ||
inputs.flake-parts.flakeModules.easyOverlay # Adds perSystem.overlayAttrs | ||
]; | ||
perSystem = { pkgs, config, ... }: | ||
{ | ||
|
||
overlayAttrs = { | ||
lbf-nix = { | ||
lbfBuild = import ./lbf-build.nix pkgs config.packages.lbf; | ||
lbfHaskell = import ./lbf-haskell.nix pkgs config.packages.lbf config.packages.lbg-haskell; | ||
lbfPreludeHaskell = import ./lbf-prelude-hs.nix pkgs config.packages.lbf config.packages.lbg-haskell; | ||
lbfPlutusHaskell = import ./lbf-plutus-hs-plutustx.nix pkgs config.packages.lbf config.packages.lbg-haskell; | ||
lbfPurescript = import ./lbf-purescript.nix pkgs config.packages.lbf config.packages.lbg-purescript; | ||
lbfPreludePurescript = import ./lbf-prelude-purescript.nix pkgs config.packages.lbf config.packages.lbg-purescript; | ||
lbfPlutusPurescript = import ./lbf-plutus-purescript.nix pkgs config.packages.lbf config.packages.lbg-purescript; | ||
}; | ||
}; | ||
|
||
}; | ||
} |
Oops, something went wrong.