getting closer to a working nix environment

This commit is contained in:
Chris Cochrun 2022-05-24 10:03:47 -05:00
parent b45763a62c
commit 24993f99f1
2 changed files with 53 additions and 3 deletions

View file

@ -1,5 +1,6 @@
with import <nixpkgs> { };
pkgs.mkShell {
{ pkgs ? <nixpkgs> { } }:
with pkgs;
mkShell {
name = "presenter-env";
nativeBuildInputs = [
@ -9,6 +10,7 @@ pkgs.mkShell {
cmake
extra-cmake-modules
pkg-config
libsForQt5.wrapQtAppsHook
# gccStdenv
# stdenv
];
@ -27,7 +29,14 @@ pkgs.mkShell {
# ffmpeg-full
# yt-dlp
];
# This creates the proper qt env so that plugins are found right.
shellHook = ''
setQtEnvironment=$(mktemp --suffix .setQtEnvironment.sh)
echo "shellHook: setQtEnvironment = $setQtEnvironment"
makeWrapper "/bin/sh" "$setQtEnvironment" "''${qtWrapperArgs[@]}"
sed "/^exec/d" -i "$setQtEnvironment"
source "$setQtEnvironment"
fish
'';
}