diff options
Diffstat (limited to '2023/Go')
| -rw-r--r-- | 2023/Go/.envrc | 2 | ||||
| -rw-r--r-- | 2023/Go/flake.lock | 27 | ||||
| -rw-r--r-- | 2023/Go/flake.nix | 28 | ||||
| -rw-r--r-- | 2023/Go/shell.nix | 17 |
4 files changed, 56 insertions, 18 deletions
diff --git a/2023/Go/.envrc b/2023/Go/.envrc index 0a722d7..3550a30 100644 --- a/2023/Go/.envrc +++ b/2023/Go/.envrc @@ -1 +1 @@ -use nix; +use flake diff --git a/2023/Go/flake.lock b/2023/Go/flake.lock new file mode 100644 index 0000000..b7695d9 --- /dev/null +++ b/2023/Go/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1741010256, + "narHash": "sha256-WZNlK/KX7Sni0RyqLSqLPbK8k08Kq7H7RijPJbq9KHM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ba487dbc9d04e0634c64e3b1f0d25839a0a68246", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/2023/Go/flake.nix b/2023/Go/flake.nix new file mode 100644 index 0000000..39dda89 --- /dev/null +++ b/2023/Go/flake.nix @@ -0,0 +1,28 @@ +{ + description = "Advent of Code 2023: Go"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = + { nixpkgs, ... }: + let + pkgs = nixpkgs.legacyPackages.x86_64-linux; + in + { + devShells.x86_64-linux.default = pkgs.mkShell { + # build tools + nativeBuildInputs = with pkgs; [ + go + ]; + # dependencies + buildInputs = with pkgs; [ + delve + gopls + gotools + golangci-lint + ]; + }; + }; +} diff --git a/2023/Go/shell.nix b/2023/Go/shell.nix deleted file mode 100644 index 9573d44..0000000 --- a/2023/Go/shell.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - pkgs ? import <nixpkgs> { }, -}: - -pkgs.mkShell { - # build tools - nativeBuildInputs = with pkgs; [ - go - ]; - # dependencies - buildInputs = with pkgs; [ - delve - gopls - gotools - golangci-lint - ]; -} |
