Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
fennecdjay committed May 16, 2024
2 parents 0a48a24 + 7592b33 commit 81bd0d5
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,34 @@ make
```

> Besides developer options, you migth want to check *USE_DOUBLE*, in util/config.mk, which set the floating point size (float or double).
> Note that the option you choose must match how you built your soundpipe library (more on soundpipe later).
> Note that the option you choose must match how you built your soundpipe library (more on soundpipe later).
## Nix - Install

To get started with Gwion, use the provided default.nix file.

Navigate to the main Gwion repository.
Enter the following command:

```bash
nix-env -if default.nix
```

This should install Gwion.

Afterwards, you can run the Gwion Interpreter with the following command:

```bash
gwion <file>
```

The default.nix file includes a fixed commit hash. If you prefer to utilize the latest version, you'll need to update the commit hash accordingly. Here's how:

- Go to the Gwion repository on GitHub.
- Locate the commit hash of the latest version you want to use.
- Update the commit hash in the default.nix file to match the desired version.
- Save the changes.
- Re-run the installation command mentioned earlier to install the updated version of Gwion.

## Executing your first code (hello_world.gw):

Expand Down
29 changes: 29 additions & 0 deletions default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{ pkgs ? import <nixpkgs> {} }: pkgs.stdenv.mkDerivation rec {
pname = "gwion";
version = "0.1";

src = pkgs.fetchFromGitHub {
owner = "Gwion";
repo = "Gwion";
rev = "9dad0ff596eeafaf1a928deb8e0a6888e303b1cc";
sha256 = "sha256-8qZzegpxMzGBuKwF0YyqOleATEmavf+ZzAV/GIx5FfE=";
fetchSubmodules = true;
};

nativeBuildInputs = with pkgs; [
git
];

installPhase = ''
mkdir -p $out/bin
cp gwion $out/bin
'';

meta = with pkgs.lib; {
description = "programming lang";
homepage = "https://github.com/Gwion/Gwion";
license = licenses.gpl3Plus;
maintainers = ["pyrotek"];
mainProgram = "gwion";
};
}

0 comments on commit 81bd0d5

Please sign in to comment.