Files
nomines/flake.nix
T
bernardo 2dbf64a2e8 Release 1.0.0: rename to NoMines, add leaderboard, theme support and release metadata
- Rename app/binary/app-id to nomines (io.github.bemagri.nomines), config dir
  moves to ~/.config/nomines with legacy path fallback
- Add persistent best-time leaderboard (Glib::KeyFile)
- Theme-aware board following system light/dark preference
- Beveled 3D cells, confetti win animation, keyboard shortcuts,
  right-click chording, per-difficulty window sizing
- Add AppStream metainfo, validate desktop file and metainfo via meson tests
- Fix license metadata to GPL-3.0-or-later and real homepage
2026-08-01 14:06:43 +01:00

93 lines
2.4 KiB
Nix

{
description = "GTK4 Minesweeper game";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
# Robust fallbacks across channels
wrapGApps = pkgs.wrapGAppsHook4 or pkgs.wrapGAppsHook;
adwaitaTheme = pkgs.gnome.adwaita-icon-theme or pkgs.adwaita-icon-theme;
in
{
# Main package
packages.default = pkgs.stdenv.mkDerivation rec {
pname = "nomines";
version = "1.0.0";
src = self;
strictDeps = true;
nativeBuildInputs = with pkgs; [
meson
ninja
pkg-config
gobject-introspection
wrapGApps
];
buildInputs = with pkgs; [
gtk4
gtkmm4
glibmm
libsigcxx30
gdk-pixbuf
librsvg # SVG loader
gvfs # GIO modules
gsettings-desktop-schemas
hicolor-icon-theme
adwaitaTheme
];
# Ensure we use Nix-provided GIO modules, not host ones
preFixup = ''
gappsWrapperArgs+=(
--set GIO_EXTRA_MODULES ${pkgs.gvfs}/lib/gio/modules
)
'';
meta = with pkgs.lib; {
description = "NoMines - a modern GTK4 Minesweeper game";
homepage = "https://github.com/bemagri/nomines";
license = licenses.gpl3Plus;
platforms = platforms.linux;
mainProgram = "nomines";
};
};
# nix run support
apps.${system}.default = {
type = "app";
program = "${self.packages.${system}.default}/bin/nomines";
};
# Dev shell for hacking
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
meson
ninja
pkg-config
gobject-introspection
];
buildInputs = with pkgs; [
gtk4
gtkmm4
glibmm
libsigcxx30
gdk-pixbuf
librsvg
gvfs
gsettings-desktop-schemas
hicolor-icon-theme
adwaitaTheme
];
};
});
}