-
Notifications
You must be signed in to change notification settings - Fork 1
Enable PlutusTx.Eq code generation plus massive Nix flake-partsify effort #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ba1591b
Enable PlutusTx.Eq code generation plus massive Nix flake-partsify ef…
bladyjoker 9cba1f3
Removes explicit src import from purs Nix invocations
bladyjoker 14853fb
Fixes codegen tests
bladyjoker 4acc0a0
Migrates Purs Codegen to handle config arguments as mergeable
bladyjoker 5e5c9d0
Migrates Purescript prelude stack to flake-parts
bladyjoker f3805ef
Fully migrates the Purescript stack to flake-parts
bladyjoker 653dfad
Migrates experimental to flake-parts
bladyjoker 7b93d25
Updates README with Catalyst Fund 10 mention
bladyjoker 6f2a01e
Move the compiler/codegen/frontend to flake parts
bladyjoker 90f6a7d
Deadnix cleanup and refactor common shellHook and tools into settings…
bladyjoker deb68bb
Tries to fix the failed builds
bladyjoker a6ffe8c
Fixes CI
bladyjoker 2f9c8e2
Removes 'import' terms
bladyjoker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.