nixpkgs/pkgs/by-name/qu/quickgui/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

57 lines
1.5 KiB
Nix

{ fetchFromGitHub
, makeDesktopItem
, copyDesktopItems
, lib
, flutter
, quickemu
, zenity
}:
flutter.buildFlutterApplication rec {
pname = "quickgui";
version = "1.2.10";
src = fetchFromGitHub {
owner = "quickemu-project";
repo = "quickgui";
rev = version;
hash = "sha256-M2Qy66RqsjXg7ZpHwaXCN8qXRIsisnIyaENx3KqmUfQ=";
};
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = {
window_size = "sha256-XelNtp7tpZ91QCEcvewVphNUtgQX7xrp5QP0oFo6DgM=";
};
extraWrapProgramArgs = "--prefix PATH : ${lib.makeBinPath [ quickemu zenity ]}";
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 = "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";
};
}