diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..2e59796 --- /dev/null +++ b/.envrc @@ -0,0 +1,2 @@ +use flake +watch_file shell.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..a138696 --- /dev/null +++ b/flake.lock @@ -0,0 +1,40 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "id": "flake-utils", + "type": "indirect" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1663491030, + "narHash": "sha256-MVsfBhE9US5DvLtBAaTRjwYdv1tLO8xjahM8qLXTgTo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "767542707d394ff15ac1981e903e005ba69528b5", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..967e2ca --- /dev/null +++ b/flake.nix @@ -0,0 +1,14 @@ +{ + description = "Project Kyoku"; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem + (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + devShell = import ./shell.nix { inherit pkgs; }; + } + ); +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..d5904b9 --- /dev/null +++ b/shell.nix @@ -0,0 +1,10 @@ +{ + pkgs ? import {}, + unstable ? import {}, +}: + +with pkgs; +mkShell { + buildInputs = [ sfml ]; + nativeBuildInputs = [ ccls cmake ]; +}