From 2d4b93d9e4611dbcfa7e8a5592741e1a49597ef3 Mon Sep 17 00:00:00 2001 From: Vri Date: Wed, 25 Oct 2023 22:30:59 +0200 Subject: [PATCH] add flake.lock devShell --- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 61 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..07517c6 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1697723726, + "narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-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..6b5d576 --- /dev/null +++ b/flake.nix @@ -0,0 +1,34 @@ +{ + description = "stadtratmonitor-rs devShell"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + 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 = builtins.attrValues { + inherit + (pkgs.buildPackages) + cargo + cargo-watch + openssl + pkg-config + rustc + rustfmt + ; + }; + }; + } + ); +}