anvil-editor: 0.4 -> 0.6

This commit is contained in:
aleksana 2025-04-06 13:05:22 +08:00
parent 93667cf859
commit 30348fd24e
2 changed files with 19 additions and 29 deletions

View file

@ -1,14 +0,0 @@
{
buildGoModule,
anvil-editor,
}:
buildGoModule {
inherit (anvil-editor) version src meta;
pname = "anvil-editor-extras";
modRoot = "anvil-extras";
vendorHash = "sha256-PH7HSMlCAHn4L1inJDbDcj6n+i6LXakIOqwdUkRjf9E=";
}

View file

@ -1,7 +1,7 @@
{ {
lib, lib,
stdenv, stdenv,
buildGoModule, buildGo123Module,
fetchzip, fetchzip,
pkg-config, pkg-config,
copyDesktopItems, copyDesktopItems,
@ -12,26 +12,31 @@
vulkan-headers, vulkan-headers,
libGL, libGL,
xorg, xorg,
callPackage,
buildPackages, buildPackages,
anvilExtras ? callPackage ./extras.nix { },
}: }:
buildGoModule rec { buildGo123Module (finalAttrs: {
pname = "anvil-editor"; pname = "anvil-editor";
version = "0.4"; version = "0.6";
# has to update vendorHash of extra package manually # has to update vendorHash of extra package manually
# nixpkgs-update: no auto update # nixpkgs-update: no auto update
src = fetchzip { src = fetchzip {
url = "https://anvil-editor.net/releases/anvil-src-v${version}.tar.gz"; url = "https://anvil-editor.net/releases/anvil-src-v${finalAttrs.version}.tar.gz";
hash = "sha256-0fi6UeppWC9KbWibjQYlPlRqsl9xsvij8YpJUS0S/wY="; hash = "sha256-i0S5V3j6OPpu4z1ljDKP3WYa9L+EKwo/MBNgW2ENYk8=";
}; };
modRoot = "anvil/src/anvil"; modRoot = "anvil/src/anvil";
vendorHash = "sha256-1oFBV7D7JgOt5yYAxVvC4vL4ccFv3JrNngZbo+5pzrk="; vendorHash = "sha256-1oFBV7D7JgOt5yYAxVvC4vL4ccFv3JrNngZbo+5pzrk=";
anvilExtras = buildGo123Module {
pname = "anvil-editor-extras";
inherit (finalAttrs) version src meta;
vendorHash = "sha256-4pfk5XuwDbCWFZIF+1l+dy8NfnGNjgHmSg9y6/RnTSo=";
modRoot = "anvil-extras";
};
nativeBuildInputs = nativeBuildInputs =
[ [
pkg-config pkg-config
@ -60,8 +65,11 @@ buildGoModule rec {
exec = "anvil"; exec = "anvil";
icon = "anvil"; icon = "anvil";
desktopName = "Anvil"; desktopName = "Anvil";
comment = meta.description; comment = finalAttrs.meta.description;
categories = [ "TextEditor" ]; categories = [
"Utility"
"TextEditor"
];
startupWMClass = "anvil"; startupWMClass = "anvil";
}) })
]; ];
@ -76,13 +84,9 @@ buildGoModule rec {
install -Dm644 anvil_''${square}x32.png $out/share/icons/hicolor/''${square}/apps/anvil.png install -Dm644 anvil_''${square}x32.png $out/share/icons/hicolor/''${square}/apps/anvil.png
done done
popd popd
cp ${anvilExtras}/bin/* $out/bin cp ${finalAttrs.anvilExtras}/bin/* $out/bin
''; '';
passthru = {
inherit anvilExtras;
};
meta = { meta = {
description = "Graphical, multi-pane tiling editor inspired by Acme"; description = "Graphical, multi-pane tiling editor inspired by Acme";
homepage = "https://anvil-editor.net"; homepage = "https://anvil-editor.net";
@ -91,4 +95,4 @@ buildGoModule rec {
maintainers = with lib.maintainers; [ aleksana ]; maintainers = with lib.maintainers; [ aleksana ];
platforms = with lib.platforms; unix ++ windows; platforms = with lib.platforms; unix ++ windows;
}; };
} })