moving away from cargo2nix as I wasn't using it

May come back to cargo2nix instead, but for now I find this simpler
This commit is contained in:
Chris Cochrun 2023-04-28 12:08:07 -05:00
parent a7e3cfa39f
commit a4b3b2256b
3 changed files with 87 additions and 141 deletions

View file

@ -2,8 +2,9 @@
description = "A Church Presentation Application";
inputs = {
cargo2nix.url = "github:cargo2nix/cargo2nix/release-0.11.0";
# 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";
};
@ -14,58 +15,59 @@
let
pkgs = import nixpkgs {
inherit system;
overlays = [cargo2nix.overlays.default];
};
src = ./.;
rustPkgs = pkgs.rustBuilder.makePackageSet {
rustVersion = "1.61.0";
packageFun = import ./Cargo.nix;
# 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
# workspaceShell = rustPkgs.workspaceShell {
# packages = with pkgs; [
# gcc
# stdenv
# bintools
# gnumake
# gdb
# qtcreator
# cmake
# extra-cmake-modules
# pkg-config
# libsForQt5.wrapQtAppsHook
# makeWrapper
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"
# '';
};
# 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"
# # '';
# };
in rec
{
@ -73,7 +75,7 @@
# crate = (rustPkgs.workspace.libre-presenter { }).bin;
# default = packages.crate;
# };
devShell = workspaceShell;
devShell = import ./shell.nix { inherit pkgs; };
defaultPackage = pkgs.libsForQt5.callPackage ./default.nix { };
}
);