Start of aaaa
This commit is contained in:
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/flake.lock -diff
|
||||
/manifest.toml -diff
|
17
.gitignore
vendored
17
.gitignore
vendored
@ -1,12 +1,7 @@
|
||||
# ---> Elixir
|
||||
/_build
|
||||
/cover
|
||||
/deps
|
||||
/doc
|
||||
/.fetch
|
||||
erl_crash.dump
|
||||
*.ez
|
||||
*.beam
|
||||
/config/*.secret.exs
|
||||
.elixir_ls/
|
||||
/result
|
||||
/.direnv
|
||||
|
||||
*.beam
|
||||
*.ez
|
||||
/build
|
||||
erl_crash.dump
|
||||
|
82
flake.lock
generated
Normal file
82
flake.lock
generated
Normal file
@ -0,0 +1,82 @@
|
||||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gleam2nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713458730,
|
||||
"narHash": "sha256-1iHuPTH2CVnyNhHrns0edU8cb7O5C7BARWgkwEAfsW4=",
|
||||
"owner": "mtoohey31",
|
||||
"repo": "gleam2nix",
|
||||
"rev": "5566163d1638faaeede739090ef4339532e5c524",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "mtoohey31",
|
||||
"repo": "gleam2nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1712757991,
|
||||
"narHash": "sha256-kR7C7Fqt3JP40h0mzmSZeWI5pk1iwqj4CSeGjnUbVHc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d6b3ddd253c578a7ab98f8011e59990f21dc3932",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"gleam2nix": "gleam2nix",
|
||||
"nixpkgs": [
|
||||
"gleam2nix",
|
||||
"nixpkgs"
|
||||
]
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
40
flake.nix
Normal file
40
flake.nix
Normal 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
19
gleam.toml
Normal 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"
|
11
manifest.toml
Normal file
11
manifest.toml
Normal file
@ -0,0 +1,11 @@
|
||||
# This file was generated by Gleam
|
||||
# You typically do not need to edit this file
|
||||
|
||||
packages = [
|
||||
{ name = "gleam_stdlib", version = "0.36.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "C0D14D807FEC6F8A08A7C9EF8DFDE6AE5C10E40E21325B2B29365965D82EB3D4" },
|
||||
{ name = "gleeunit", version = "1.1.2", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "72CDC3D3F719478F26C4E2C5FED3E657AC81EC14A47D2D2DEBB8693CA3220C3B" },
|
||||
]
|
||||
|
||||
[requirements]
|
||||
gleam_stdlib = { version = "~> 0.34 or ~> 1.0" }
|
||||
gleeunit = { version = "~> 1.0" }
|
5
src/gleamish.gleam
Normal file
5
src/gleamish.gleam
Normal file
@ -0,0 +1,5 @@
|
||||
import gleam/io
|
||||
|
||||
pub fn main() {
|
||||
io.println("Hello from changeme!")
|
||||
}
|
12
test/gleamish_test.gleam
Normal file
12
test/gleamish_test.gleam
Normal 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)
|
||||
}
|
Reference in New Issue
Block a user