diff --git a/flake.lock b/flake.lock index dade030..fd477dd 100644 --- a/flake.lock +++ b/flake.lock @@ -1,6 +1,63 @@ { "nodes": { + "fenix": { + "inputs": { + "nixpkgs": [ + "naersk", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1752475459, + "narHash": "sha256-z6QEu4ZFuHiqdOPbYss4/Q8B0BFhacR8ts6jO/F/aOU=", + "owner": "nix-community", + "repo": "fenix", + "rev": "bf0d6f70f4c9a9cf8845f992105652173f4b617f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "naersk": { + "inputs": { + "fenix": "fenix", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1752689277, + "narHash": "sha256-uldUBFkZe/E7qbvxa3mH1ItrWZyT6w1dBKJQF/3ZSsc=", + "owner": "nix-community", + "repo": "naersk", + "rev": "0e72363d0938b0208d6c646d10649164c43f4d64", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "naersk", + "type": "github" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1752077645, + "narHash": "sha256-HM791ZQtXV93xtCY+ZxG1REzhQenSQO020cu6rHtAPk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "be9e214982e20b8310878ac2baa063a961c1bdf6", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1756542300, "narHash": "sha256-tlOn88coG5fzdyqz6R93SQL5Gpq+m/DsWpekNFhqPQk=", @@ -18,7 +75,25 @@ }, "root": { "inputs": { - "nixpkgs": "nixpkgs" + "naersk": "naersk", + "nixpkgs": "nixpkgs_2" + } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1752428706, + "narHash": "sha256-EJcdxw3aXfP8Ex1Nm3s0awyH9egQvB2Gu+QEnJn2Sfg=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "591e3b7624be97e4443ea7b5542c191311aa141d", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" } } }, diff --git a/flake.nix b/flake.nix index 1595293..5bd37fc 100644 --- a/flake.nix +++ b/flake.nix @@ -2,21 +2,22 @@ description = "lead-rust"; inputs = { + naersk.url = "github:nix-community/naersk"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; }; outputs = { self, + naersk, nixpkgs, }: let system = "x86_64-linux"; pkgs = import nixpkgs {inherit system;}; + naerskLib = pkgs.callPackage naersk {}; in { - devShells.default = pkgs.mkShell { - buildInputs = with pkgs; [ - openssl - ]; - + packages.${system}.default = naerskLib.buildPackage { + src = ./.; + buildInputs = [pkgs.openssl]; nativeBuildInputs = [pkgs.pkg-config]; }; }; diff --git a/src/main.rs b/src/main.rs index d6bc050..ed35c6f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,8 +5,6 @@ mod tokenizer; use std::io; -use std::{io, net::SocketAddr}; -use tokio::{net::TcpListener, runtime::Runtime}; use websocket::server::WsServer; use crate::{cell::CellRef, evaluator::Evaluator};