Skip to content

Commit

Permalink
pkgs/ftb-app: init
Browse files Browse the repository at this point in the history
  • Loading branch information
tomodachi94 committed Aug 30, 2024
1 parent 9fafbf6 commit 0c87283
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ in
} // pkgs.lib.optionalAttrs pkgs.stdenv.isLinux {
crossover = cp ./linux/crossover.nix { };
crosshair-dot = cp ./linux/crosshair-dot.nix { };
ftb-app = cp ./linux/ftb-app.nix { };
hp-linuxtools = cp ./linux/hp-linuxtools.nix { };
hudkit = cp ./linux/hudkit.nix { };
volnoti = cp ./linux/volnoti.nix { };
Expand Down
30 changes: 30 additions & 0 deletions pkgs/linux/ftb-app.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{ lib
, appimageTools
, fetchurl
,
}:

let
version = "1.25.18";
pname = "ftb-app";
name = "${pname}-${version}";

src = fetchurl {
url = "https://piston.feed-the-beast.com/app/ftb-app-${version}-x86_64.AppImage";
hash = "sha256-qqcEovw8SoPzHS3Uz82IxONa/LHr9y9/rt2tIXE/P8g=";
};

appimageContents = appimageTools.extractType1 { inherit name src; };
in
appimageTools.wrapType1 {
inherit name src;

extraInstallCommands = ''
ls ${appimageContents}
mv $out/bin/${name} $out/bin/${pname}
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
substituteInPlace $out/share/applications/${pname}.desktop \
--replace-fail 'Exec=AppRun' 'Exec=${pname}'
cp -r ${appimageContents}/usr/share/icons $out/share
'';
}

0 comments on commit 0c87283

Please sign in to comment.