Unverified Commit 5ae6aff5 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #222941 from Zumorica/2023-03-24-ss14-launcher

space-station-14-launcher: init at 0.20.5
parents a5cb02dd c768d8ff
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -17501,6 +17501,12 @@
    githubId = 393108;
    name = "Damien Diederen";
  };
  zumorica = {
    name = "Vera Aguilera Puerto";
    email = "gradientvera+nix@outlook.com";
    github = "Zumorica";
    githubId = 6766154;
  };
  zupo = {
    name = "Nejc Zupan";
    email = "nejczupan+nix@gmail.com";
+40 −0
Original line number Diff line number Diff line
{ soundfont-fluid
, buildFHSEnv
, runCommand
, callPackage
}:

let
  space-station-14-launcher = callPackage ./space-station-14-launcher.nix { };

  # Workaround for hardcoded soundfont paths in downloaded engine assemblies.
  soundfont-fluid-fixed = runCommand "soundfont-fluid-fixed" { } ''
    mkdir -p "$out/share/soundfonts"
    ln -sf ${soundfont-fluid}/share/soundfonts/FluidR3_GM2-2.sf2 $out/share/soundfonts/FluidR3_GM.sf2
  '';
in
buildFHSEnv rec {
  name = "space-station-14-launcher-wrapped";

  targetPkgs = pkgs: [
    space-station-14-launcher
    soundfont-fluid-fixed
  ];

  runScript = "SS14.Launcher";

  extraInstallCommands = ''
    mkdir -p $out/share/applications
    ln -s ${space-station-14-launcher}/share/icons $out/share
    cp ${space-station-14-launcher}/share/applications/space-station-14-launcher.desktop "$out/share/applications"
    substituteInPlace "$out/share/applications/space-station-14-launcher.desktop" \
        --replace ${space-station-14-launcher.meta.mainProgram} ${meta.mainProgram}
  '';

  passthru = space-station-14-launcher.passthru // {
    unwrapped = space-station-14-launcher;
  };
  meta = space-station-14-launcher.meta // {
    mainProgram = name;
  };
}
+169 −0

File added.

Preview size limit exceeded, changes collapsed.

+143 −0

File added.

Preview size limit exceeded, changes collapsed.

+18 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading