diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 6f6924a..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: test - -on: - push: - branches: - - master - - main - pull_request: - -jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: erlef/setup-beam@v1 - with: - otp-version: "27.1.2" - gleam-version: "1.10.0" - rebar3-version: "3" - # elixir-version: "1" - - run: gleam deps download - - run: gleam test - - run: gleam format --check src test diff --git a/.gitignore b/.gitignore index 28b3f97..61000c2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,3 @@ -*.beam -*.ez -/build -erl_crash.dump +.direnv/ result -.env -.direnv \ No newline at end of file +.env \ No newline at end of file diff --git a/README.md b/README.md deleted file mode 100644 index 09d4f47..0000000 --- a/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# switcheroo - -[![Package Version](https://img.shields.io/hexpm/v/switcheroo)](https://hex.pm/packages/switcheroo) -[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/switcheroo/) - -```sh -gleam add switcheroo@1 -``` -```gleam -import switcheroo - -pub fn main() -> Nil { - // TODO: An example of the project in use -} -``` - -Further documentation can be found at . - -## Development - -```sh -gleam run # Run the project -gleam test # Run the tests -``` diff --git a/flake.lock b/flake.lock index b916aad..63fd3fc 100644 --- a/flake.lock +++ b/flake.lock @@ -1,35 +1,20 @@ { "nodes": { - "flake-utils": { + "flake-parts": { "inputs": { - "systems": "systems" + "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", "type": "github" }, "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nix-gleam": { - "locked": { - "lastModified": 1717670865, - "narHash": "sha256-+dAPiKAwCzlKWtx3aIHXfR6jydh1JyangewqZKJx500=", - "owner": "arnarg", - "repo": "nix-gleam", - "rev": "c69abe0e57a01991654d3de63dcd93a8b91b98ff", - "type": "github" - }, - "original": { - "owner": "arnarg", - "repo": "nix-gleam", + "owner": "hercules-ci", + "repo": "flake-parts", "type": "github" } }, @@ -49,27 +34,26 @@ "type": "github" } }, - "root": { - "inputs": { - "flake-utils": "flake-utils", - "nix-gleam": "nix-gleam", - "nixpkgs": "nixpkgs" - } - }, - "systems": { + "nixpkgs-lib": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "lastModified": 1743296961, + "narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa", "type": "github" }, "original": { - "owner": "nix-systems", - "repo": "default", + "owner": "nix-community", + "repo": "nixpkgs.lib", "type": "github" } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 5df33ad..a78ce00 100644 --- a/flake.nix +++ b/flake.nix @@ -1,42 +1,20 @@ { - description = "My gleam application"; + description = "plapkit"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - inputs.flake-utils.url = "github:numtide/flake-utils"; - inputs.nix-gleam.url = "github:arnarg/nix-gleam"; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + }; - outputs = { - self, - nixpkgs, - flake-utils, - nix-gleam, - }: ( - flake-utils.lib.eachDefaultSystem - (system: let - pkgs = import nixpkgs { - inherit system; - overlays = [ - nix-gleam.overlays.default - ]; - }; - in rec { - packages.default = pkgs.buildGleamApplication { - # The pname and version will be read from the `gleam.toml` - # file generated by gleam. - # But this can be overwritten here too: - # pname = "my-app"; - # version = "1.2.3"; - - # The target is read from the `gleam.toml` file too. - # Default is "erlang" if nothing is specified but - # this can also be overwritten here too: - # target = "javascript"; - - # Erlang package can be overridden but defaults to - # `pkgs.erlang`. - # erlangPackage = pkgs.erlang_nox; + outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } { + systems = [ "x86_64-linux" "aarch64-linux" ]; + perSystem = { config, self', pkgs, lib, system, ... }: rec { + devShells.default = import ./shell.nix { inherit pkgs; }; + packages.default = pkgs.buildGoModule { + name = "switcheroo"; src = ./.; + vendorHash = "sha256-YY7Hj7lSq7vEoMEIu/zmweWzd7p7KF+4YCUX2SJ7kwI="; }; packages.container = pkgs.dockerTools.buildImage { @@ -52,6 +30,6 @@ Cmd = [ "${packages.default}/bin/switcheroo" ]; }; }; - }) - ); + }; + }; } \ No newline at end of file diff --git a/gleam.toml b/gleam.toml deleted file mode 100644 index 3a1723b..0000000 --- a/gleam.toml +++ /dev/null @@ -1,19 +0,0 @@ -name = "switcheroo" -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 = "", repo = "" } -# links = [{ title = "Website", href = "" }] -# -# 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.44.0 and < 2.0.0" - -[dev-dependencies] -gleeunit = ">= 1.0.0 and < 2.0.0" diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..9b87954 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module git.sapphic.engineer/noe/switcheroo + +go 1.24.2 diff --git a/main.go b/main.go new file mode 100644 index 0000000..c048119 --- /dev/null +++ b/main.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("hello world") +} diff --git a/manifest.toml b/manifest.toml deleted file mode 100644 index 22f5a58..0000000 --- a/manifest.toml +++ /dev/null @@ -1,11 +0,0 @@ -# This file was generated by Gleam -# You typically do not need to edit this file - -packages = [ - { name = "gleam_stdlib", version = "0.59.0", build_tools = ["gleam"], requirements = [], otp_app = "gleam_stdlib", source = "hex", outer_checksum = "F8FEE9B35797301994B81AF75508CF87C328FE1585558B0FFD188DC2B32EAA95" }, - { name = "gleeunit", version = "1.3.1", build_tools = ["gleam"], requirements = ["gleam_stdlib"], otp_app = "gleeunit", source = "hex", outer_checksum = "A7DD6C07B7DA49A6E28796058AA89E651D233B357D5607006D70619CD89DAAAB" }, -] - -[requirements] -gleam_stdlib = { version = ">= 0.44.0 and < 2.0.0" } -gleeunit = { version = ">= 1.0.0 and < 2.0.0" } diff --git a/shell.nix b/shell.nix index 11899c7..7210e41 100644 --- a/shell.nix +++ b/shell.nix @@ -1,5 +1,7 @@ { pkgs ? import {} }: pkgs.mkShell { buildInputs = with pkgs; [ - gleam + go + just + sqlite ]; } diff --git a/src/switcheroo.gleam b/src/switcheroo.gleam deleted file mode 100644 index 2882b05..0000000 --- a/src/switcheroo.gleam +++ /dev/null @@ -1,5 +0,0 @@ -import gleam/io - -pub fn main() -> Nil { - io.println("Hello from switcheroo!") -} diff --git a/test/switcheroo_test.gleam b/test/switcheroo_test.gleam deleted file mode 100644 index f8eb5bc..0000000 --- a/test/switcheroo_test.gleam +++ /dev/null @@ -1,12 +0,0 @@ -import gleeunit -import gleeunit/should - -pub fn main() -> Nil { - gleeunit.main() -} - -// gleeunit test functions end in `_test` -pub fn hello_world_test() { - 1 - |> should.equal(1) -}