commit 40e63f04fd251167b12f870703b90ebb25abd799 Author: Chris Cochrun Date: Fri Dec 27 17:07:39 2024 -0600 initial commit diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..a5dbbcb --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake . diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..223ed99 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "shelly" +version = "0.1.0" +edition = "2021" +description = "A shell for a computadora" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +clap = { version = "4.5.20", features = ["debug", "derive"] } +libcosmic = { git = "https://github.com/pop-os/libcosmic", features = ["debug", "winit", "tokio", "xdg-portal", "dbus-config", "a11y", "wayland", "wgpu", "multi-window", "single-instance"] } +miette = { version = "7.2.0", features = ["fancy"] } +pretty_assertions = "1.4.1" +serde = { version = "1.0.213", features = ["derive"] } +tracing = "0.1.40" +tracing-subscriber = { version = "0.3.18", features = ["fmt", "std", "chrono", "time", "local-time", "env-filter"] } +ron = "0.8.1" +dirs = "5.0.1" +tokio = "1.41.1" +crisp = { git = "https://git.tfcconnection.org/chris/crisp", version = "0.1.3" } + diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..baab9b2 --- /dev/null +++ b/flake.lock @@ -0,0 +1,145 @@ +{ + "nodes": { + "fenix": { + "inputs": { + "nixpkgs": "nixpkgs", + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1735281280, + "narHash": "sha256-FgW6NkzbGlmNeY0lywjvXgrZD+UPS/+848kI30Yaup0=", + "owner": "nix-community", + "repo": "fenix", + "rev": "3915fd69e1a2827209f3a1080cb8bcca48d11fa7", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "naersk": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1733346208, + "narHash": "sha256-a4WZp1xQkrnA4BbnKrzJNr+dYoQr5Xneh2syJoddFyE=", + "owner": "nix-community", + "repo": "naersk", + "rev": "378614f37a6bee5a3f2ef4f825a73d948d3ae921", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "naersk", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1734649271, + "narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 0, + "narHash": "sha256-Qn3nPMSopRQJgmvHzVqPcE3I03zJyl8cSbgnnltfFDY=", + "path": "/nix/store/avxvalb7xf8x4avmrbcvn1vr5yy46kxs-source", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1735291276, + "narHash": "sha256-NYVcA06+blsLG6wpAbSPTCyLvxD/92Hy4vlY9WxFI1M=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "634fd46801442d760e09493a794c4f15db2d0cbb", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "fenix": "fenix", + "flake-utils": "flake-utils", + "naersk": "naersk", + "nixpkgs": "nixpkgs_3" + } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1735227773, + "narHash": "sha256-eYkxxU3Bqr7uLMKXOIb9BGlaD0W/I2pI6bh1SIuPZH4=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "1ce4de2585cb9802c4d5a99d1a904b11fdba9501", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "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 0000000..a6b508a --- /dev/null +++ b/flake.nix @@ -0,0 +1,80 @@ +{ + description = "A shell for a computadora"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + naersk.url = "github:nix-community/naersk"; + flake-utils.url = "github:numtide/flake-utils"; + fenix.url = "github:nix-community/fenix"; + }; + + outputs = inputs: with inputs; + flake-utils.lib.eachDefaultSystem + (system: + let + pkgs = import nixpkgs { + inherit system; + overlays = [fenix.overlays.default]; + # overlays = [cargo2nix.overlays.default]; + }; + naersk' = pkgs.callPackage naersk {}; + nbi = with pkgs; [ + # Rust tools + alejandra + (pkgs.fenix.stable.withComponents [ + "cargo" + "clippy" + "rust-src" + "rustc" + "rustfmt" + ]) + rust-analyzer + gtk-layer-shell + gtk3 + vulkan-loader + wayland + wayland-protocols + libxkbcommon + pkg-config + ]; + + bi = with pkgs; [ + gcc + stdenv + gnumake + gdb + makeWrapper + vulkan-headers + vulkan-loader + vulkan-tools + libGL + + just + cargo-watch + ]; + in rec + { + devShell = pkgs.mkShell { + nativeBuildInputs = nbi; + buildInputs = bi; + LD_LIBRARY_PATH = "$LD_LIBRARY_PATH:${ + with pkgs; + pkgs.lib.makeLibraryPath [ + pkgs.vulkan-loader + pkgs.wayland + pkgs.wayland-protocols + pkgs.libxkbcommon + ] + }"; + }; + defaultPackage = naersk'.buildPackage { + src = ./.; + }; + packages = { + default = naersk'.buildPackage { + src = ./.; + }; + }; + } + ); +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..1989129 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() -> cosmic::iced::Result { + println!("hello") +}