Merge pull request #316835 from eclairevoyant/fix-chrysalis-script

chrysalis: mark update script executable, fix source provenance, and other cleanup
This commit is contained in:
éclairevoyant 2024-06-24 22:30:27 +00:00 committed by GitHub
commit a4853d2129
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 13 deletions

View File

@ -1,18 +1,20 @@
{ lib, appimageTools, fetchurl }:
{
lib,
appimageTools,
fetchurl,
}:
let
pname = "chrysalis";
version = "0.13.3";
name = "${pname}-${version}-binary";
src = fetchurl {
url =
"https://github.com/keyboardio/${pname}/releases/download/v${version}/${pname}-${version}-x64.AppImage";
hash =
"sha512-F6Y87rgIclj1OA3gVX/gqqp9AvXKQlBXrbqk/26F1KHPF9NzHJgVmeszSo3Nhb6xg4CzWmzkqc8IW2H/Bg57kw==";
url = "https://github.com/keyboardio/chrysalis/releases/download/v${version}/chrysalis-${version}-x64.AppImage";
hash = "sha512-F6Y87rgIclj1OA3gVX/gqqp9AvXKQlBXrbqk/26F1KHPF9NzHJgVmeszSo3Nhb6xg4CzWmzkqc8IW2H/Bg57kw==";
};
appimageContents = appimageTools.extract { inherit name src; };
in appimageTools.wrapType2 rec {
inherit name pname src;
appimageContents = appimageTools.extract { inherit pname version src; };
in
appimageTools.wrapType2 {
inherit pname version src;
extraPkgs = pkgs: [ pkgs.glib ];
@ -30,7 +32,7 @@ in appimageTools.wrapType2 rec {
-t $out/share/applications
substituteInPlace \
$out/share/applications/Chrysalis.desktop \
--replace 'Exec=Chrysalis' 'Exec=${pname}'
--replace-fail 'Exec=Chrysalis' 'Exec=${pname}'
install -Dm444 ${appimageContents}/usr/share/icons/hicolor/256x256/chrysalis.png -t $out/share/pixmaps
'';
@ -40,9 +42,15 @@ in appimageTools.wrapType2 rec {
meta = with lib; {
description = "Graphical configurator for Kaleidoscope-powered keyboards";
homepage = "https://github.com/keyboardio/Chrysalis";
license = licenses.gpl3Only;
maintainers = with maintainers; [ aw eclairevoyant nshalman ];
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
aw
eclairevoyant
nshalman
];
platforms = [ "x86_64-linux" ];
mainProgram = "chrysalis";
# buildFHSEnv will create a symlink in $out/bin/${pname}
mainProgram = pname;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
}

0
pkgs/by-name/ch/chrysalis/update.sh Normal file → Executable file
View File