-
-
Notifications
You must be signed in to change notification settings - Fork 79
/
package.nix
59 lines (53 loc) · 1.69 KB
/
package.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
52
53
54
55
56
57
58
59
{ fetchFromGitHub
, makeDesktopItem
, copyDesktopItems
, lib
, flutter
, gnome
, quickemu
}:
let
runtimeBinDependencies = [ quickemu gnome.zenity ];
versionMatches = builtins.match ''
.*
.*version:[[:blank:]]([[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+\+?[[:digit:]]*)
.*
'' (builtins.readFile ./pubspec.yaml);
in
flutter.buildFlutterApplication rec {
pname = "quickgui";
version = builtins.concatStringsSep "" versionMatches;
src = lib.cleanSource ./.;
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = {
window_size = "sha256-XelNtp7tpZ91QCEcvewVphNUtgQX7xrp5QP0oFo6DgM=";
};
# These things are added to LD_LIBRARY_PATH, but not PATH
extraWrapProgramArgs = "--prefix PATH : ${lib.makeBinPath runtimeBinDependencies}";
nativeBuildInputs = [ copyDesktopItems ];
postFixup = ''
for SIZE in 16 32 48 64 128 256 512; do
mkdir -p $out/share/icons/hicolor/$SIZEx$SIZE/apps/
cp -av assets/resources/quickgui_$SIZE.png $out/share/icons/hicolor/$SIZEx$SIZE/apps/quickgui.png
done
'';
desktopItems = [
(makeDesktopItem {
name = "quickgui";
exec = "quickgui";
icon = "quickgui";
desktopName = "Quickgui";
comment = "An elegant virtual machine manager for the desktop";
categories = [ "Development" "System" ];
})
];
meta = with lib; {
description = "An elegant virtual machine manager for the desktop";
homepage = "https://github.com/quickemu-project/quickgui";
changelog = "https://github.com/quickemu-project/quickgui/releases/";
license = licenses.mit;
maintainers = with maintainers; [ flexiondotorg heyimnova ];
platforms = [ "x86_64-linux" ];
mainProgram = "quickgui";
};
}