This commit is contained in:
Chris Cochrun 2024-09-11 11:22:00 -05:00
parent c8a4642827
commit 0121dfa8f3
5 changed files with 1579 additions and 1108 deletions

2464
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -6,6 +6,6 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
iced = { version = "0.10.0", features = ["image", "debug", "system"] }
iced_aw = "0.7.0"
iced_winit = "0.10.0"
iced = { version = "0.12.1", features = ["tokio", "image", "debug", "system"] }
iced_aw = "0.9.2"
# iced_winit = "0.10.0"

View file

@ -1,5 +1,24 @@
{
"nodes": {
"fenix": {
"inputs": {
"nixpkgs": "nixpkgs",
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1725949977,
"narHash": "sha256-wyprFbiEQfc3iopAXEtyxrQpxKTv3bByEZQno8GiN5I=",
"owner": "nix-community",
"repo": "fenix",
"rev": "930afdff0d11e60fa5956947513feb57463284af",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@ -20,7 +39,7 @@
},
"naersk": {
"inputs": {
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1694081375,
@ -37,6 +56,22 @@
}
},
"nixpkgs": {
"locked": {
"lastModified": 1725634671,
"narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1696725822,
"narHash": "sha256-B7uAOS7TkLlOg1aX01rQlYbydcyB6ZnLJSfaYbKVww8=",
@ -50,7 +85,7 @@
"type": "indirect"
}
},
"nixpkgs_2": {
"nixpkgs_3": {
"locked": {
"lastModified": 1696604326,
"narHash": "sha256-YXUNI0kLEcI5g8lqGMb0nh67fY9f2YoJsILafh6zlMo=",
@ -68,9 +103,27 @@
},
"root": {
"inputs": {
"fenix": "fenix",
"flake-utils": "flake-utils",
"naersk": "naersk",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_3"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1725890120,
"narHash": "sha256-7bsWAKG/otbHj7wmCBrJ9P6ve2MFcoOlIh6wcx6ffKg=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "e35227d186acd47d8e5f78cbd792d57ddf47d74b",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
},
"systems": {

102
flake.nix
View file

@ -2,11 +2,10 @@
description = "A Church Presentation Application";
inputs = {
# cargo2nix.url = "github:cargo2nix/cargo2nix/release-0.11.0";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
naersk.url = "github:nix-community/naersk";
flake-utils.url = "github:numtide/flake-utils";
# nixpkgs.follows = "cargo2nix/nixpkgs";
fenix.url = "github:nix-community/fenix";
};
outputs = inputs: with inputs;
@ -15,68 +14,57 @@
let
pkgs = import nixpkgs {
inherit system;
overlays = [fenix.overlays.default];
# overlays = [cargo2nix.overlays.default];
};
naersk' = pkgs.callPackage naersk {};
# src = ./.;
# rustPkgs = pkgs.rustBuilder.makePackageSet {
# rustVersion = "1.61.0";
# packageFun = import ./Cargo.nix;
# };
# The workspace defines a development shell with all of the dependencies
# and environment settings necessary for a regular `cargo build`.
# Passes through all arguments to pkgs.mkShell for adding supplemental
# dependencies.
# workspaceShell = rustPkgs.workspaceShell {
# packages = with pkgs; [
# gcc
# stdenv
# bintools
# gnumake
# gdb
# qtcreator
# cmake
# extra-cmake-modules
# pkg-config
# libsForQt5.wrapQtAppsHook
# makeWrapper
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
];
# clang-tools
# clang
# libclang
# qt5.qtbase
# qt5.qttools
# qt5.qtquickcontrols2
# qt5.qtx11extras
# qt5.qtmultimedia
# qt5.qtwayland
# qt5.qtwebengine
# libsForQt5.kirigami2
# libsForQt5.qqc2-desktop-style
# libsForQt5.karchive
# mpv
# ffmpeg_6-full
# # Rust tools
# clippy
# rustc
# cargo
# rustfmt
# rust-analyzer
# corrosion
# ];
# # shellHook = ''
# # export PS1="\033[0;31m☠dev-shell☠ $ \033[0m"
# # '';
# };
bi = [
gcc
stdenv
gnumake
gdb
makeWrapper
vulkan-headers
vulkan-loader
vulkan-tools
libGL
# podofo
mpv
ffmpeg-full
# yt-dlp
just
];
in rec
{
# packages = {
# crate = (rustPkgs.workspace.libre-presenter { }).bin;
# default = packages.crate;
# };
devShell = import ./shell.nix { inherit pkgs; };
defaultPackage = pkgs.libsForQt5.callPackage ./default.nix { };
devShell = pkgs.mkShell {
nativeBuildInputs = nbi;
buildInputs = bi;
};
defaultPackage = naersk'.buildPackage {
src = ./.;
};
}
);
}

View file

@ -1,56 +0,0 @@
{ pkgs ? import <nixpkgs> { } }:
with pkgs;
mkShell rec {
name = "lumina";
nativeBuildInputs = [
gtk-layer-shell
gtk3
vulkan-loader
wayland
wayland-protocols
libxkbcommon
pkg-config
];
buildInputs = [
gcc
stdenv
gnumake
gdb
makeWrapper
vulkan-headers
vulkan-loader
vulkan-tools
libGL
# podofo
mpv
ffmpeg_5-full
# yt-dlp
# Rust tools
clippy
rustc
cargo
rustfmt
rust-analyzer
];
# cargoDeps = rustPlatform.importCargoLock {
# lockFile = ./Cargo.lock;
# };
RUST_BACKTRACE = "full";
CMAKE_C_COMPILER = "${gcc}/bin/gcc";
CMAKE_CXX_COMPILER = "${gcc}/bin/g++";
# This creates the proper qt env so that plugins are found right.
# shellHook = ''
# setQtEnvironment=$(mktemp --suffix .setQtEnvironment.sh)
# echo "shellHook: setQtEnvironment = $setQtEnvironment"
# makeQtWrapper "/bin/sh" "$setQtEnvironment" "''${qtWrapperArgs[@]}"
# sed "/^exec/d" -i "$setQtEnvironment"
# source "$setQtEnvironment"
# export QT_PLUGIN_PATH="$QT_PLUGIN_PATH:/nix/store/85jx8w2nh1ln4kb0hf3dc6ky0dh6ri24-lightly-qt-0.4.1/lib/qt-5.15.9/plugins"
# '';
}