Start of aaaa

This commit is contained in:
pingu 2024-05-21 18:36:13 +02:00
parent d6e2c26943
commit fcc4f44a17
9 changed files with 85 additions and 11 deletions

1
.envrc Normal file
View File

@ -0,0 +1 @@
use flake

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
/flake.lock -diff
/manifest.toml -diff

17
.gitignore vendored
View File

@ -1,12 +1,7 @@
# ---> Elixir /result
/_build /.direnv
/cover
/deps
/doc
/.fetch
erl_crash.dump
*.ez
*.beam
/config/*.secret.exs
.elixir_ls/
*.beam
*.ez
/build
erl_crash.dump

BIN
flake.lock Normal file

Binary file not shown.

40
flake.nix Normal file
View File

@ -0,0 +1,40 @@
{
description = "Gleamish";
inputs = {
nixpkgs.follows = "gleam2nix/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
gleam2nix.url = "github:mtoohey31/gleam2nix";
};
outputs = { self, nixpkgs, flake-utils, gleam2nix }: {
overlays = rec {
expects-gleam2nix = final: _: {
Gleamish = final.buildGleamProgram {
src = builtins.path { path = ./.; name = "Gleamish-src"; };
};
};
default = nixpkgs.lib.composeManyExtensions [
gleam2nix.overlays.default
expects-gleam2nix
];
buildInputs = with nixpkgs; [
tree-sitter-grammars.tree-sitter-gleam
];
};
} // flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
overlays = [ self.overlays.default ];
inherit system;
};
inherit (pkgs) Gleamish mkShell;
in
{
packages.default = Gleamish;
devShells.default = mkShell {
inputsFrom = [ Gleamish ];
};
});
}

19
gleam.toml Normal file
View File

@ -0,0 +1,19 @@
name = "gleamish"
version = "1.0.0"
# Fill out these fields if you intend to generate HTML documentation or publish
# your project to the Hex package manager.
#
# description = ""
# licences = ["Apache-2.0"]
# repository = { type = "github", user = "username", repo = "project" }
# links = [{ title = "Website", href = "https://gleam.run" }]
#
# For a full reference of all the available options, you can have a look at
# https://gleam.run/writing-gleam/gleam-toml/.
[dependencies]
gleam_stdlib = "~> 0.34 or ~> 1.0"
[dev-dependencies]
gleeunit = "~> 1.0"

BIN
manifest.toml Normal file

Binary file not shown.

5
src/gleamish.gleam Normal file
View File

@ -0,0 +1,5 @@
import gleam/io
pub fn main() {
io.println("Hello from changeme!")
}

12
test/gleamish_test.gleam Normal file
View File

@ -0,0 +1,12 @@
import gleeunit
import gleeunit/should
pub fn main() {
gleeunit.main()
}
// gleeunit test functions end in `_test`
pub fn hello_world_test() {
1
|> should.equal(1)
}