my own fork

This commit is contained in:
Chris Cochrun 2025-08-26 15:21:24 -05:00
parent a8656e8021
commit 6ff166120c
4 changed files with 2565 additions and 1402 deletions

3639
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -8,7 +8,7 @@ keywords = ["gui", "iced", "video"]
categories = ["gui", "multimedia"] categories = ["gui", "multimedia"]
version = "0.6.0" version = "0.6.0"
authors = ["jazzfool"] authors = ["jazzfool"]
edition = "2021" edition = "2024"
resolver = "2" resolver = "2"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
exclude = [ exclude = [
@ -16,8 +16,8 @@ exclude = [
] ]
[dependencies] [dependencies]
iced = { version = "0.13", features = ["image", "advanced", "wgpu"] } # iced = { git = "https://github.com/iced-rs/iced", branch = "master", features = ["image", "advanced", "wgpu"] }
iced_wgpu = "0.13" iced_wgpu = { git = "https://github.com/iced-rs/iced", branch = "master"}
gstreamer = "0.23" gstreamer = "0.23"
gstreamer-app = "0.23" # appsink gstreamer-app = "0.23" # appsink
gstreamer-base = "0.23" # basesrc gstreamer-base = "0.23" # basesrc
@ -26,6 +26,11 @@ log = "0.4"
thiserror = "1" thiserror = "1"
url = "2" # media uri url = "2" # media uri
[dependencies.iced]
git = "https://github.com/iced-rs/iced"
branch = "master"
features = ["wgpu", "image", "advanced", "svg", "canvas", "hot", "debug", "lazy", "tokio"]
[package.metadata.nix] [package.metadata.nix]
systems = ["x86_64-linux"] systems = ["x86_64-linux"]
app = true app = true

201
flake.lock generated
View file

@ -1,69 +1,126 @@
{ {
"nodes": { "nodes": {
"devshell": { "fenix": {
"locked": { "inputs": {
"lastModified": 1629275356, "nixpkgs": "nixpkgs",
"narHash": "sha256-R17M69EKXP6q8/mNHaK53ECwjFo1pdF+XaJC9Qq8zjg=", "rust-analyzer-src": "rust-analyzer-src"
"owner": "numtide", },
"repo": "devshell", "locked": {
"rev": "26f25a12265f030917358a9632cd600b51af1d97", "lastModified": 1755585599,
"type": "github" "narHash": "sha256-tl/0cnsqB/Yt7DbaGMel2RLa7QG5elA8lkaOXli6VdY=",
}, "owner": "nix-community",
"original": { "repo": "fenix",
"owner": "numtide", "rev": "6ed03ef4c8ec36d193c18e06b9ecddde78fb7e42",
"repo": "devshell", "type": "github"
"type": "github" },
} "original": {
}, "owner": "nix-community",
"flakeCompat": { "repo": "fenix",
"flake": false, "type": "github"
"locked": { }
"lastModified": 1627913399, },
"narHash": "sha256-hY8g6H2KFL8ownSiFeMOjwPC8P0ueXpCVEbxgda3pko=", "fenix_2": {
"owner": "edolstra",
"repo": "flake-compat",
"rev": "12c64ca55c1014cdc1b16ed5a804aa8576601ff2",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"nixCargoIntegration": {
"inputs": { "inputs": {
"devshell": "devshell",
"nixpkgs": [ "nixpkgs": [
"naersk",
"nixpkgs" "nixpkgs"
], ],
"rustOverlay": "rustOverlay" "rust-analyzer-src": "rust-analyzer-src_2"
}, },
"locked": { "locked": {
"lastModified": 1629871751, "lastModified": 1752475459,
"narHash": "sha256-QjnDg34ApcnjmXlNLnbHswT9OroCPY7Wip6r9Zkgkfo=", "narHash": "sha256-z6QEu4ZFuHiqdOPbYss4/Q8B0BFhacR8ts6jO/F/aOU=",
"owner": "yusdacra", "owner": "nix-community",
"repo": "nix-cargo-integration", "repo": "fenix",
"rev": "4f164ecad242537d5893426eef02c47c9e5ced59", "rev": "bf0d6f70f4c9a9cf8845f992105652173f4b617f",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "yusdacra", "owner": "nix-community",
"repo": "nix-cargo-integration", "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": {
"fenix": "fenix_2",
"nixpkgs": "nixpkgs_2"
},
"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" "type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1629618782, "lastModified": 1755186698,
"narHash": "sha256-2K8SSXu3alo/URI3MClGdDSns6Gb4ZaW4LET53UWyKk=", "narHash": "sha256-wNO3+Ks2jZJ4nTHMuks+cxAiVBGNuEBXsT29Bz6HASo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "fbcf476f790d8a217c3eab4e12033dc4a0f6d23c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1752077645,
"narHash": "sha256-HM791ZQtXV93xtCY+ZxG1REzhQenSQO020cu6rHtAPk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "870959c7fb3a42af1863bed9e1756086a74eb649", "rev": "be9e214982e20b8310878ac2baa063a961c1bdf6",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1756125398,
"narHash": "sha256-XexyKZpf46cMiO5Vbj+dWSAXOnr285GHsMch8FBoHbc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3b9f00d7a7bf68acd4c4abb9d43695afb04e03a5",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
@ -71,24 +128,58 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flakeCompat": "flakeCompat", "fenix": "fenix",
"nixCargoIntegration": "nixCargoIntegration", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "naersk": "naersk",
"nixpkgs": "nixpkgs_3"
} }
}, },
"rustOverlay": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1629857564, "lastModified": 1755504847,
"narHash": "sha256-dClWiHkbaCDaIl520Miri66UOA8OecWbaVTWJBajHyM=", "narHash": "sha256-VX0B9hwhJypCGqncVVLC+SmeMVd/GAYbJZ0MiiUn2Pk=",
"owner": "oxalica", "owner": "rust-lang",
"repo": "rust-overlay", "repo": "rust-analyzer",
"rev": "88848c36934318e16c86097f65dbf97a57968d81", "rev": "a905e3b21b144d77e1b304e49f3264f6f8d4db75",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "oxalica", "owner": "rust-lang",
"repo": "rust-overlay", "ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
},
"rust-analyzer-src_2": {
"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"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github" "type": "github"
} }
} }

116
flake.nix
View file

@ -1,28 +1,100 @@
{ {
description = "A video widget";
inputs = { inputs = {
flakeCompat = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
url = "github:edolstra/flake-compat"; naersk.url = "github:nix-community/naersk";
flake = false; flake-utils.url = "github:numtide/flake-utils";
}; fenix.url = "github:nix-community/fenix";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixCargoIntegration = {
url = "github:yusdacra/nix-cargo-integration";
inputs.nixpkgs.follows = "nixpkgs";
};
}; };
outputs = inputs: outputs = inputs: with inputs;
inputs.nixCargoIntegration.lib.makeOutputs { flake-utils.lib.eachDefaultSystem
root = ./.; (system:
overrides = { let
shell = common: prev: { pkgs = import nixpkgs {
env = prev.env ++ [ inherit system;
{ overlays = [fenix.overlays.default];
name = "GST_PLUGIN_PATH"; # overlays = [cargo2nix.overlays.default];
value = "${common.pkgs.gst_all_1.gstreamer}:${common.pkgs.gst_all_1.gst-plugins-bad}:${common.pkgs.gst_all_1.gst-plugins-ugly}:${common.pkgs.gst_all_1.gst-plugins-good}:${common.pkgs.gst_all_1.gst-plugins-base}"; };
} naersk' = pkgs.callPackage naersk {};
nbi = with pkgs; [
# Rust tools
alejandra
(pkgs.fenix.stable.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
rust-analyzer
vulkan-loader
wayland
wayland-protocols
libxkbcommon
pkg-config
sccache
]; ];
};
}; bi = with pkgs; [
}; gcc
stdenv
gnumake
gdb
lldb
cmake
makeWrapper
vulkan-headers
vulkan-loader
vulkan-tools
libGL
cargo-flamegraph
fontconfig
glib
alsa-lib
gst_all_1.gst-libav
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-ugly
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-rs
gst_all_1.gst-vaapi
gst_all_1.gstreamer
# podofo
# mpv
ffmpeg-full
# yt-dlp
just
cargo-watch
];
in rec
{
devShell = pkgs.mkShell.override {
# stdenv = pkgs.stdenvAdapters.useMoldLinker pkgs.clangStdenv;
} {
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 = ./.;
};
};
}
);
} }