diff --git a/targets/lenovo-x1-carbon.nix b/targets/lenovo-x1-carbon.nix index ac20bf5c1e..d81dbb1231 100644 --- a/targets/lenovo-x1-carbon.nix +++ b/targets/lenovo-x1-carbon.nix @@ -67,7 +67,9 @@ } ]; } - ({pkgs, ...}: { + ({pkgs, ...}: let + demo-pdf = pkgs.callPackage ../user-apps/demo-pdf {}; + in { ghaf.graphics.weston.launchers = [ { path = "${pkgs.openssh}/bin/ssh -i ${pkgs.waypipe-ssh}/keys/waypipe-ssh -o StrictHostKeyChecking=no chromium-vm.ghaf ${pkgs.waypipe}/bin/waypipe --border \"#ff5733,5\" --vsock -s ${toString guivmConfig.waypipePort} server chromium --enable-features=UseOzonePlatform --ozone-platform=wayland"; @@ -80,7 +82,7 @@ } { - path = "${pkgs.openssh}/bin/ssh -i ${pkgs.waypipe-ssh}/keys/waypipe-ssh -o StrictHostKeyChecking=no zathura-vm.ghaf ${pkgs.waypipe}/bin/waypipe --border \"#337aff,5\" --vsock -s ${toString guivmConfig.waypipePort} server zathura"; + path = "${pkgs.openssh}/bin/ssh -i ${pkgs.waypipe-ssh}/keys/waypipe-ssh -o StrictHostKeyChecking=no zathura-vm.ghaf ${pkgs.waypipe}/bin/waypipe --border \"#337aff,5\" --vsock -s ${toString guivmConfig.waypipePort} server zathura ${demo-pdf}/Whitepaper.pdf"; icon = "${../assets/icons/png/pdf.png}"; } @@ -193,7 +195,7 @@ } { name = "zathura"; - packages = [pkgs.zathura]; + packages = [pkgs.zathura (pkgs.callPackage ../user-apps/demo-pdf {})]; macAddress = "02:00:00:03:07:01"; ramMb = 512; cores = 1; diff --git a/user-apps/demo-pdf/Whitepaper.pdf b/user-apps/demo-pdf/Whitepaper.pdf new file mode 100644 index 0000000000..2c255af85c Binary files /dev/null and b/user-apps/demo-pdf/Whitepaper.pdf differ diff --git a/user-apps/demo-pdf/default.nix b/user-apps/demo-pdf/default.nix new file mode 100644 index 0000000000..048d99604f --- /dev/null +++ b/user-apps/demo-pdf/default.nix @@ -0,0 +1,28 @@ +# Copyright 2022-2023 TII (SSRC) and the Ghaf contributors +# SPDX-License-Identifier: Apache-2.0 +{ + stdenv, + pkgs, + lib, + ... +}: +stdenv.mkDerivation { + name = "demo-pdf"; + + src = ./Whitepaper.pdf; + phases = ["installPhase"]; + + installPhase = '' + mkdir -p $out/bin + cp ${./Whitepaper.pdf} $out/Whitepaper.pdf + echo "zathura $out/Whitepaper.pdf" > $out/bin/run-zathura + chmod 755 $out/bin/run-zathura + ''; + + meta = with lib; { + description = "Demo PDF"; + platforms = [ + "x86_64-linux" + ]; + }; +}