From e8ea9461ed3ded4032192d09893368b42d7914a3 Mon Sep 17 00:00:00 2001 From: akulij Date: Wed, 26 Feb 2025 16:36:38 +0000 Subject: [PATCH] Create files to develop in nix --- flake.lock | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 13 +++++++++++++ shell.nix | 6 ++++++ 3 files changed, 76 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 shell.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..5204aae --- /dev/null +++ b/flake.lock @@ -0,0 +1,57 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 0, + "narHash": "sha256-7Fu7oazPoYCbDzb9k8D/DdbKrC3aU1zlnc39Y8jy/s8=", + "path": "/nix/store/m4wcdchjxw2fdyzjp8i6irpc613pchkr-source", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..815b97b --- /dev/null +++ b/flake.nix @@ -0,0 +1,13 @@ +{ + inputs = { + flake-utils.url = "github:numtide/flake-utils"; + }; + outputs = {self, nixpkgs, flake-utils, ...}@inputs: + flake-utils.lib.eachDefaultSystem + (system: + let pkgs = nixpkgs.legacyPackages.${system}; in + { + devShells.default = import ./shell.nix { inherit pkgs; }; + } + ); +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..e3460e5 --- /dev/null +++ b/shell.nix @@ -0,0 +1,6 @@ +{ pkgs ? import { } }: +pkgs.mkShell { + buildInputs = [ + pkgs.go + ]; +}