-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdefault.nix
49 lines (46 loc) · 1.15 KB
/
default.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
{
lib,
makeDesktopItem,
rustPlatform,
pname ? "star-citizen-helper",
gnome,
zenity ? gnome.zenity,
pkg-config,
openssl,
makeWrapper,
...
}:
let
tomlConfig = builtins.fromTOML (builtins.readFile ./Cargo.toml);
inherit (tomlConfig.package) name version;
binPath = lib.makeBinPath [ zenity ];
in
rustPlatform.buildRustPackage {
inherit name version;
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
nativeBuildInputs = [
pkg-config
makeWrapper
];
buildInputs = [ openssl ];
postInstall = ''
wrapProgram "$out/bin/${name}" --prefix PATH : "${binPath}"
'';
desktopItems = makeDesktopItem {
name = pname;
exec = "${name} %U";
icon = ./../../logo.png;
comment = "Star Citizen Helper script EXPERIMENTAL";
desktopName = "Star Citizen Helper (Experimental)";
categories = [ "Utility" ];
mimeTypes = [ "application/x-star-citizen-helper" ];
};
meta = {
description = "Star Citizen helper script (Experimental)";
homepage = "https://github.com/LovingMelody/NixCitizen";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ fuzen ];
platforms = [ "x86_64-linux" ];
};
}