From a88564806518bb7d3009a62e23878c88cffc13fd Mon Sep 17 00:00:00 2001 From: "Rph :3" <11350302+rphsoftware@users.noreply.github.com> Date: Wed, 20 Aug 2025 18:27:43 +0200 Subject: [PATCH] initial commit --- .envrc | 1 + .gitignore | 2 ++ Cargo.toml | 6 ++++++ flake.lock | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 32 +++++++++++++++++++++++++++ src/main.rs | 3 +++ 6 files changed, 106 insertions(+) create mode 100644 .envrc create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 src/main.rs diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..8392d15 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1edb211 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +/.direnv \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..6e7ed9d --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "Excavator" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..6c96626 --- /dev/null +++ b/flake.lock @@ -0,0 +1,62 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1755577059, + "narHash": "sha256-5hYhxIpco8xR+IpP3uU56+4+Bw7mf7EMyxS/HqUYHQY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "97eb7ee0da337d385ab015a23e15022c865be75c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1744536153, + "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + } + }, + "rust-overlay": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1755657401, + "narHash": "sha256-rPHuWPAcwW63wH1SUtDCqAnf2+60pi/pGMCIhVobzXc=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "292ca754b0f679b842fbfc4734f017c351f0e9eb", + "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..af245e5 --- /dev/null +++ b/flake.nix @@ -0,0 +1,32 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + rust-overlay.url = "github:oxalica/rust-overlay"; + }; + + outputs = { self, nixpkgs, rust-overlay , ...}: + let + overlays = [ (import rust-overlay ) ]; + in { + packages."x86_64-linux".default = + let + pkgs = import nixpkgs { + system = "x86_64-linux"; + inherit overlays; + }; + native-deps = with pkgs; [ + + ]; + in + pkgs.mkShell { + buildInputs = with pkgs; [ + (rust-bin.stable.latest.default.override { + extensions = [ "rust-src" ]; + targets = ["x86_64-unknown-linux-gnu" ]; + }) + cargo-bloat + ] ++ native-deps; + LD_LIBRARY_PATH = (pkgs.lib.makeLibraryPath native-deps); + }; + }; +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}