From 8cb3215945d644dfe109f968ff26fa51b3ad18b1 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Fri, 29 Apr 2022 22:32:01 +0800 Subject: [PATCH] Add Nix devshell --- flake.lock | 43 +++++++++++++++++++++++++++++++++++++++++++ flake.nix | 15 +++++++++++++++ shell.nix | 12 ++++++++++++ 3 files changed, 70 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..6bdcae2 --- /dev/null +++ b/flake.lock @@ -0,0 +1,43 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1649676176, + "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1651114127, + "narHash": "sha256-/lLC0wkMZkAdA5e1W76SnJzbhfOGDvync3VRHJMtAKk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6766fb6503ae1ebebc2a9704c162b2aef351f921", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "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..189e44a --- /dev/null +++ b/flake.nix @@ -0,0 +1,15 @@ +{ + description = "Flake for hugo-theme-more-contentful."; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = inputs@{ self, nixpkgs, ... }: + let systems = inputs.flake-utils.lib.defaultSystems; + in inputs.flake-utils.lib.eachSystem systems (system: { + devShells.default = + import ./shell.nix { pkgs = import nixpkgs { inherit system; }; }; + }); +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..fa911b1 --- /dev/null +++ b/shell.nix @@ -0,0 +1,12 @@ +{ pkgs ? import { } }: + +with pkgs; + +mkShell { + packages = [ + asciidoctor + go + git + hugo + ]; +}