commit 18aa3c815b3cbdf6958d306ffd58980abf3ed7b2 Author: Chris Cochrun Date: Tue Oct 25 12:43:06 2022 -0500 initial commit diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..c28002c --- /dev/null +++ b/default.nix @@ -0,0 +1,118 @@ +# { pkgs ? import { } }: +# with pkgs; +{ + stdenv, + lib, + # kglobalaccel, + # kinit, + # kwin, + # kio, + # kguiaddons, + # kcoreaddons, + gcc, + gnumake, + clang, + cmake, + extra-cmake-modules, + pkg-config, + wrapQtAppsHook, + qtbase, + qt5Full, + clang-tools, + qttools, + qtquickcontrols2, + qtx11extras, + qtmultimedia, + karchive, + kirigami2, + ki18n, + kcoreaddons, + # lightly-qt, + podofo, + mpv +}: + +stdenv.mkDerivation rec { + name = "Libre Presenter"; + pname = "libre-presenter"; + version = "0.0.1"; + + src = ./.; + + nativeBuildInputs = [ + gcc + gnumake + clang + clang-tools + cmake + extra-cmake-modules + pkg-config + wrapQtAppsHook + # gccStdenv + # stdenv + ]; + + buildInputs = [ + qtbase + qttools + qtquickcontrols2 + qtx11extras + qtmultimedia + # qtwayland + kirigami2 + # breeze-icons + # breeze-qt5 + # qqc2-desktop-style + karchive + ki18n + kcoreaddons + # lightly-qt + podofo + mpv + # libsForQt5.kconfig + # ffmpeg-full + # yt-dlp + ]; + + # preConfigure = '' + # # local modulepath=$(kf5-config --install module) + # # local datapath=$(kf5-config --install data) + # # local servicespath=$(kf5-config --install services) + # # substituteInPlace CMakeLists.txt \ + # # --replace "\''${MODULEPATH}" "$out/''${modulepath#/nix/store/*/}" \ + # # --replace "\''${DATAPATH}" "$out/''${datapath#/nix/store/*/}" + + # # substituteInPlace CMakeLists.txt \ + # # --replace "\''${MODULEPATH}" "$out/qt-5.15.3/plugins" \ + # # --replace "\''${DATAPATH}" "$out/share" + # ''; + + # postConfigure = '' + # substituteInPlace cmake_install.cmake \ + # --replace "${kdelibs4support}" "$out" + + # ''; + + configurePhase = '' + cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -B build/ . + ''; + + buildPhase = '' + make --dir build/ + rm -rf ~/.cache/librepresenter/Libre\ Presenter/qmlcache/ + ''; + + installPhase = '' + mkdir -p $out/bin + mv build/bin/presenter $out/bin + ''; + + meta = with lib; { + name = "Libre Presenter"; + description = "A church presentation software made with QT/QML"; + homepage = ""; + license = licenses.gpl3; + maintainers = [ "chriscochrun" ]; + platforms = platforms.all; + }; +} diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..7f79e0f --- /dev/null +++ b/flake.lock @@ -0,0 +1,43 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1666629043, + "narHash": "sha256-Yoq6Ut2F3Ol73yO9hG93x6ts5c4F5BhKTbcF3DtBEAw=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "b39fd6e4edef83cb4a135ebef98751ce23becc33", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..940bf07 --- /dev/null +++ b/flake.nix @@ -0,0 +1,20 @@ +{ + description = "TFC Website"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem + (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + src = ./.; + in + { + devShell = import ./shell.nix { inherit pkgs; }; + } + ); +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..a22f5a4 --- /dev/null +++ b/shell.nix @@ -0,0 +1,15 @@ +{ pkgs ? import { } }: +with pkgs; +mkShell rec { + name = "tfc-env"; + + nativeBuildInputs = [ + ]; + + buildInputs = [ + hugo + ]; + + shellHook = '' + ''; +}