diff --git a/flake.nix b/flake.nix index 85d6e86..9a8ac10 100644 --- a/flake.nix +++ b/flake.nix @@ -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"; diff --git a/swi-prolog/.envrc b/swi-prolog/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/swi-prolog/.envrc @@ -0,0 +1 @@ +use flake diff --git a/swi-prolog/flake.lock b/swi-prolog/flake.lock new file mode 100644 index 0000000..2ac74d2 --- /dev/null +++ b/swi-prolog/flake.lock @@ -0,0 +1,25 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1729665710, + "narHash": "sha256-AlcmCXJZPIlO5dmFzV3V2XF6x/OpNWUV8Y/FMPGd8Z4=", + "rev": "2768c7d042a37de65bb1b5b3268fc987e534c49d", + "revCount": 696158, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.696158%2Brev-2768c7d042a37de65bb1b5b3268fc987e534c49d/0192bd28-d6c0-735c-ab86-8ab9d12f7d62/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/swi-prolog/flake.nix b/swi-prolog/flake.nix new file mode 100644 index 0000000..6faa542 --- /dev/null +++ b/swi-prolog/flake.nix @@ -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 ]; + }; + }); + }; +}