From 2f401b4413a82b1c8e6b8b66dd136e76e39fc4f1 Mon Sep 17 00:00:00 2001 From: Jun Date: Sun, 18 Sep 2022 12:27:22 -0300 Subject: [PATCH] Add nix/flake files --- .envrc | 2 ++ flake.lock | 40 ++++++++++++++++++++++++++++++++++++++++ flake.nix | 14 ++++++++++++++ shell.nix | 10 ++++++++++ 4 files changed, 66 insertions(+) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 shell.nix 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 ]; +}