From 86c5c0a7863d9ee0ef2be2ed91226eb658d4695a Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 7 Feb 2024 15:03:04 -0600 Subject: [PATCH] build: add flake.nix for direnv use --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 26 ++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..c9418e7 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1707205916, + "narHash": "sha256-fmRJilYGlB7VCt3XsdYxrA0u8e/K84O5xYucerUY0iM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "8cc79aa39bbc6eaedaf286ae655b224c71e02907", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f444328 --- /dev/null +++ b/flake.nix @@ -0,0 +1,26 @@ +{ + description = "nimpkgs website"; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; + }; + + outputs = inputs @ { + self, + nixpkgs, + }: let + inherit (nixpkgs.lib) genAttrs; + supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"]; + forAllSystems = f: genAttrs supportedSystems (system: f nixpkgs.legacyPackages.${system}); + in { + devShells = forAllSystems (pkgs: { + default = pkgs.mkShell { + buildInputs = with pkgs; [ + nim + nim-atlas + watchexec + nodePackages.pnpm + ]; + }; + }); + }; +}