add: desktop entry, metadata, app name, icons

This commit is contained in:
2026-08-27 22:01:13 -04:00
parent 53d58fcb7e
commit 2f4cfe51b7
5 changed files with 180 additions and 6 deletions
+36 -6
View File
@@ -3,7 +3,8 @@
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
outputs =
{ self, nixpkgs }:
let
supportedSystems = [
"x86_64-linux"
@@ -12,7 +13,16 @@
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
in
{
packages = forAllSystems (system:
formatter = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
pkgs.nixfmt-rfc-style
);
packages = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
@@ -23,7 +33,8 @@
src = pkgs.lib.cleanSourceWith {
src = ./.;
filter = path: type:
filter =
path: type:
let
name = baseNameOf path;
in
@@ -47,6 +58,20 @@
gtk4
];
postInstall = ''
install -Dm444 \
data/com.wyattjmiller.snespatcher.desktop \
$out/share/applications/com.wyattjmiller.snespatcher.desktop
install -Dm444 \
data/com.wyattjmiller.snespatcher.metainfo.xml \
$out/share/metainfo/com.wyattjmiller.snespatcher.metainfo.xml
install -Dm444 \
data/icons/hicolor/scalable/apps/com.wyattjmiller.snespatcher.svg \
$out/share/icons/hicolor/scalable/apps/com.wyattjmiller.snespatcher.svg
'';
meta = {
description = "GTK 4 application for applying IPS patches to SNES ROMs";
homepage = "https://scm.wyattjmiller.com/wymiller/snespatcher";
@@ -57,9 +82,11 @@
};
default = snespatcher;
});
}
);
devShells = forAllSystems (system:
devShells = forAllSystems (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
@@ -72,8 +99,11 @@
clippy
rustc
rustfmt
desktop-file-utils
appstream
];
};
});
}
);
};
}