From 256d076aff61ebe9d772a42838d7040afc90b54a Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Sat, 16 Jul 2022 13:31:14 +0200 Subject: [PATCH] Flake for development --- .envrc | 1 + flake.lock | 43 +++++++++++++++++++++++++++++++++++++++++++ flake.nix | 18 ++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 .envrc create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..8fb2bbd --- /dev/null +++ b/flake.lock @@ -0,0 +1,43 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1656928814, + "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1653936696, + "narHash": "sha256-M6bJShji9AIDZ7Kh7CPwPBPb/T7RiVev2PAcOi4fxDQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ce6aa13369b667ac2542593170993504932eb836", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "22.05", + "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..c26515b --- /dev/null +++ b/flake.nix @@ -0,0 +1,18 @@ +{ + description = "weewx environment"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/22.05"; + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + devShells.default = pkgs.mkShell { + packages = with pkgs; [ + python310 + ]; + }; + }); +}