From 238613bd29ae0c24975edeb798fc85de9b483cb9 Mon Sep 17 00:00:00 2001 From: Andrii Demus Date: Mon, 30 Sep 2024 16:14:21 +0200 Subject: [PATCH 1/2] Initial flake version --- flake.lock | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 38 +++++++++++++++++++++ 2 files changed, 134 insertions(+) create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/flake.lock b/flake.lock new file mode 100644 index 000000000..b0be29b5d --- /dev/null +++ b/flake.lock @@ -0,0 +1,96 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1727348695, + "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1925c603f17fc89f4c8f6bf6f631a802ad85d784", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1718428119, + "narHash": "sha256-WdWDpNaq6u1IPtxtYHHWpl5BmabtpmLnMAx0RdJ/vo8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e6cea36f83499eb4e9cd184c8a8e823296b50ad5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + } + }, + "rust-overlay": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1727663505, + "narHash": "sha256-83j/GrHsx8GFUcQofKh+PRPz6pz8sxAsZyT/HCNdey8=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "c2099c6c7599ea1980151b8b6247a8f93e1806ee", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "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 000000000..ce90b3d57 --- /dev/null +++ b/flake.nix @@ -0,0 +1,38 @@ +{ + description = "Next-generation decentralized data lakehouse and a multi-party stream processing network"; + + 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, rust-overlay, flake-utils, ... }: + flake-utils.lib.eachDefaultSystem (system: + let + overlays = [ (import rust-overlay) ]; + pkgs = import nixpkgs { + inherit system overlays; + }; + darwinPkgs = [ + pkgs.darwin.apple_sdk.frameworks.SystemConfiguration + pkgs.darwin.apple_sdk.frameworks.CoreServices + ]; + in + { + devShells.default = with pkgs; mkShell { + buildInputs = [ + rust-bin.nightly."2024-06-13".default + rust-analyzer + jq + kubo + flatbuffers + protobuf + ] ++ lib.optionals pkgs.stdenv.isDarwin darwinPkgs; + + shellHook = '' + ''; + }; + } + ); +} From f40e9a55aac4007e9baa42b31bbfe37821c103f7 Mon Sep 17 00:00:00 2001 From: Andrii Demus Date: Wed, 2 Oct 2024 02:49:04 +0200 Subject: [PATCH 2/2] Use Rust version from toolchain file --- flake.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index ce90b3d57..1f29bb7d6 100644 --- a/flake.nix +++ b/flake.nix @@ -22,7 +22,7 @@ { devShells.default = with pkgs; mkShell { buildInputs = [ - rust-bin.nightly."2024-06-13".default + (rust-bin.fromRustupToolchainFile ./rust-toolchain) rust-analyzer jq kubo