Initial commit

Signed-off-by: Louis Hollingworth <louis@hollingworth.nl>
This commit is contained in:
Louis Hollingworth 2025-02-09 20:10:08 +00:00
commit 3ce7592d22
Signed by: lucxjo
GPG key ID: A11415CB3DC7809B
7 changed files with 4305 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
/target
result
/.direnv

4098
Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

7
Cargo.toml Normal file
View file

@ -0,0 +1,7 @@
[package]
name = "bsky-iced"
version = "0.1.0"
edition = "2024"
[dependencies]
iced = { version = "0.13.1", features = ["advanced", "tokio"] }

116
flake.lock generated Normal file
View file

@ -0,0 +1,116 @@
{
"nodes": {
"crane": {
"locked": {
"lastModified": 1739053031,
"narHash": "sha256-LrMDRuwAlRFD2T4MgBSRd1s2VtOE+Vl1oMCNu3RpPE0=",
"owner": "ipetkov",
"repo": "crane",
"rev": "112e6591b2d6313b1bd05a80a754a8ee42432a7e",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"fenix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1739082714,
"narHash": "sha256-cylMa750pId3Hqvzyurd86qJIYyyMWB0M7Gbh7ZB2tY=",
"owner": "nix-community",
"repo": "fenix",
"rev": "e84058a7fe56aa01f2db19373cce190098494698",
"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"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1739020877,
"narHash": "sha256-mIvECo/NNdJJ/bXjNqIh8yeoSjVLAuDuTUzAo7dzs8Y=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a79cfe0ebd24952b580b1cf08cd906354996d547",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"crane": "crane",
"fenix": "fenix",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1738997488,
"narHash": "sha256-jeNdFVtEDLypGIbNqBjURovfw9hMkVtlLR7j/5fRh54=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "208bc52b5dc177badc081c64eb0584a313c73242",
"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
}

61
flake.nix Normal file
View file

@ -0,0 +1,61 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
crane = {
url = "github:ipetkov/crane";
inputs = {
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs";
};
};
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs:
with inputs;
flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
inherit system;
};
libPath = with pkgs;
lib.makeLibraryPath [
wayland
libxkbcommon
libGL
];
craneLib =
(crane.mkLib pkgs).overrideToolchain
fenix.packages.${system}.beta.toolchain;
bsky-iced = craneLib.buildPackage {
src = ./.;
buildInputs =
[
# Add additional build inputs here
pkgs.wayland
]
++ pkgs.lib.optionals pkgs.stdenv.isDarwin [
# Additional darwin specific inputs can be set here
];
LD_LIBRARY_PATH = "${libPath}";
};
in {
devShells = {
default = pkgs.mkShell {
packages = with pkgs; [
fenix.packages.${system}.beta.toolchain
wayland
];
LD_LIBRARY_PATH = "${libPath}";
};
};
packages = {
default = bsky-iced;
};
}
);
}

19
src/main.rs Normal file
View file

@ -0,0 +1,19 @@
#[derive(Default)]
struct App {}
#[derive(Debug)]
enum Message {}
impl App {
fn update(&mut self, message: Message) {}
fn view(&self) -> iced::Element<'_, Message> {
let content = iced::widget::column!["Saluton, Mondo!"];
content.into()
}
}
fn main() {
iced::application("Icysky", App::update, App::view)
.run()
.unwrap();
}