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

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 = ./.;
};
}
);
}