-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nixos): add flake support (#12)
- Loading branch information
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
description = "Electron-based gaming hub"; | ||
|
||
outputs = | ||
{ self, nixpkgs }: | ||
let | ||
forAllSystems = nixpkgs.lib.genAttrs systems; | ||
pkgsFor = nixpkgs.legacyPackages; | ||
systems = [ "x86_64-linux" ]; | ||
in | ||
{ | ||
packages = forAllSystems (system: { | ||
default = | ||
with pkgsFor.${system}; | ||
stdenvNoCC.mkDerivation (finalAttrs: { | ||
pname = "falkor"; | ||
version = "0.0.92"; | ||
|
||
src = fetchurl { | ||
url = "https://github.com/Team-Falkor/app/releases/download/v${finalAttrs.version}/falkor.deb"; | ||
hash = "sha256-yDpYu2ehrRQuD29jcyTQla2R2IT1zfBDeWDDRnmqc8Y="; | ||
}; | ||
|
||
unpackPhase = '' | ||
runHook preUnpack | ||
dpkg -x $src ./ | ||
runHook postUnpack | ||
''; | ||
|
||
nativeBuildInputs = [ | ||
makeWrapper | ||
dpkg | ||
]; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
mkdir -p $out/bin | ||
mv usr/share $out/share | ||
sed -i "s|Exec=.*|Exec=$out/bin/falkor|" $out/share/applications/*.desktop | ||
mv opt/falkor $out/opt | ||
makeWrapper ${lib.getExe electron} $out/bin/falkor \ | ||
--argv0 "falkor" \ | ||
--add-flags "$out/opt/resources/app.asar" \ | ||
runHook postInstall | ||
''; | ||
}); | ||
}); | ||
}; | ||
} |