Skip to content

Commit

Permalink
Add swi-prolog environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Fede-26 committed Oct 25, 2024
1 parent ff07f4f commit 0ff8e1a
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Once your preferred template has been initialized, you can use the provided shel
| [Rust from toolchain file][rust] | [`rust-toolchain`](./rust-toolchain/) |
| [Scala] | [`scala`](./scala/) |
| [Shell] | [`shell`](./shell/) |
| [Swi-prolog] | [`swi-prolog`](./swi-prolog/) |
| [Swift] | [`swift`](./swift) |
| [Vlang] | [`vlang`](./vlang/) |
| [Zig] | [`zig`](./zig/) |
Expand Down Expand Up @@ -295,6 +296,10 @@ A dev template that's fully customizable.

- [shellcheck] 0.9.0

### [`swi-prolog`](./swi-prolog/)

- [swi-prolog]

### [`swift`](./swift/)

- [Swift] 5.8
Expand Down Expand Up @@ -425,6 +430,7 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T
[sbt]: https://scala-sbt.org
[sourcekit-lsp]: https://github.com/swiftlang/sourcekit-lsp
[spago]: https://github.com/purescript/spago
[swi-prolog]: https://www.swi-prolog.org
[swift]: https://swift.org
[tectonic]: https://tectonic-typesetting.github.io
[terraform]: https://terraform.io
Expand Down
5 changes: 5 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,11 @@
description = "Shell script development environment";
};

swi-prolog = {
path = ./swi-prolog;
description = "Swi-prolog development environment";
};

swift = {
path = ./swift;
description = "Swift development environment";
Expand Down
1 change: 1 addition & 0 deletions swi-prolog/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
25 changes: 25 additions & 0 deletions swi-prolog/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions swi-prolog/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
description = "A Nix-flake-based Swi-prolog development environment";

inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";

outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [ swi-prolog ];
};
});
};
}

0 comments on commit 0ff8e1a

Please sign in to comment.