Unverified Commit 3a25d00d authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

fstl: install desktop entry (#489682)

parents 4e08b22b 4a8e07ff
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -4,15 +4,23 @@
  fetchFromGitHub,
  cmake,
  libsForQt5,
  xdg-utils,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "fstl";
  version = "0.11.1";

  postPatch = ''
    patchShebangs --build xdg/xdg_install.sh
    substituteInPlace xdg/fstlapp-fstl.desktop \
      --replace-fail 'Exec=fstl' 'Exec=${placeholder "out"}/bin/fstl'
  '';

  nativeBuildInputs = [
    cmake
    libsForQt5.wrapQtAppsHook
    xdg-utils
  ];

  installPhase = lib.optionalString stdenv.hostPlatform.isDarwin ''
@@ -24,6 +32,10 @@ stdenv.mkDerivation (finalAttrs: {
    runHook postInstall
  '';

  postInstall = ''
    env --chdir ../xdg XDG_DATA_HOME=$out/share ./xdg_install.sh fstl
  '';

  src = fetchFromGitHub {
    owner = "fstl-app";
    repo = "fstl";