-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathflake.nix
More file actions
62 lines (53 loc) · 1.53 KB
/
flake.nix
File metadata and controls
62 lines (53 loc) · 1.53 KB
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
52
53
54
55
56
57
58
59
60
61
62
{
description = "BestClient DDNet";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
packages.${system}.default = pkgs.stdenv.mkDerivation {
pname = "bestclient";
version = "1.5";
src = pkgs.fetchurl {
url = "https://github.com/RoflikBEST/bestdownload/releases/download/v1.5/bestclient.tar.xz";
hash = "sha256-fDjtdj6mC76IXJLul0wfj7+7GETU/vveJ8G6S4LskLk";
};
nativeBuildInputs = [
pkgs.autoPatchelfHook
pkgs.makeWrapper
];
buildInputs = [
pkgs.stdenv.cc.cc.lib
pkgs.SDL2
pkgs.freetype
pkgs.libGL
pkgs.curl
pkgs.openssl
pkgs.vulkan-loader
pkgs.libnotify
];
installPhase = ''
mkdir -p $out/bin $out/share/applications
cp -r . $out/
chmod +x $out/DDNet
cat > $out/share/applications/bestclient.desktop <<EOF
[Desktop Entry]
Name=BestClient
Comment=DDNet client with extra features
Exec=$out/bin/bestclient
Icon=$out/data/BestClient/bc_icon.png
Type=Application
Categories=Game;
EOF
# wrap the binary so it runs from the right directory
makeWrapper $out/DDNet $out/bin/bestclient \
--run "cd $out"
'';
};
apps.${system}.default = {
type = "app";
program = "${self.packages.${system}.default}/bin/bestclient";
};
};
}