-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathflake.nix
51 lines (44 loc) · 1.38 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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
'';
});
});
};
}