From cef7b34c5ab303d45a9c94b989835a039f97204b Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Tue, 6 Apr 2021 18:17:50 -0400 Subject: [PATCH] Flake support --- flake.lock | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 24 ++++++++++++++ 2 files changed, 117 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..6d50d98 --- /dev/null +++ b/flake.lock @@ -0,0 +1,93 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1617631617, + "narHash": "sha256-PARRCz55qN3gy07VJZIlFeOX420d0nGF0RzGI/9hVlw=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b2c27d1a81b0dc266270fa8aeecebbd1807fc610", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "locked": { + "lastModified": 1614513358, + "narHash": "sha256-LakhOx3S1dRjnh0b5Dg3mbZyH0ToC9I8Y2wKSkBaTzU=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5466c5bbece17adaab2d82fae80b46e807611bf3", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1617636226, + "narHash": "sha256-iZhBWrOR2DoDs1C+0FlnM9AQLMol/qoGQ+d+S43CKJM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "3d1a7716d7f1fccbd7d30ab3b2ed3db831f43bde", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1617325113, + "narHash": "sha256-GksR0nvGxfZ79T91UUtWjjccxazv6Yh/MvEJ82v1Xmw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "54c1e44240d8a527a8f4892608c4bce5440c3ecb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1617740844, + "narHash": "sha256-ymJIGNI8/KVozGP4I0Kbt8UTNP+Pkv6lk3W+ABhLeFg=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "8d3bb1034727d9a2084764230a1802131899a585", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..6993615 --- /dev/null +++ b/flake.nix @@ -0,0 +1,24 @@ +{ + description = "bouncy"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + rust-overlay.url = "github:oxalica/rust-overlay"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils, rust-overlay }: + flake-utils.lib.eachDefaultSystem + (system: + let pkgs = import nixpkgs { + inherit system; + overlays = [rust-overlay.overlay ]; + }; in { + devShell = pkgs.mkShell { + nativeBuildInputs = [ + pkgs.rust-bin.stable.latest.default + ]; + }; + } + ); +}