4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
44 lines
1.2 KiB
Nix
44 lines
1.2 KiB
Nix
{ lib, stdenv, fetchurl, pkgconfig, vala, gnome3, gtk3, wrapGAppsHook, appstream-glib, desktop-file-utils
|
|
, glib, librsvg, libxml2, gettext, itstool, libgee, libgnome-games-support
|
|
, meson, ninja, python3
|
|
}:
|
|
|
|
let
|
|
pname = "gnome-klotski";
|
|
version = "3.38.1";
|
|
in stdenv.mkDerivation rec {
|
|
name = "${pname}-${version}";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
|
|
sha256 = "00rwi6z0068pbq01sq2d389ffcqsh3ylq3i8zkrqvblqid1hvnlv";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
pkgconfig vala meson ninja python3 wrapGAppsHook
|
|
gettext itstool libxml2 appstream-glib desktop-file-utils
|
|
gnome3.adwaita-icon-theme
|
|
];
|
|
buildInputs = [ glib gtk3 librsvg libgee libgnome-games-support ];
|
|
|
|
postPatch = ''
|
|
chmod +x build-aux/meson_post_install.py
|
|
patchShebangs build-aux/meson_post_install.py
|
|
'';
|
|
|
|
passthru = {
|
|
updateScript = gnome3.updateScript {
|
|
packageName = pname;
|
|
attrPath = "gnome3.${pname}";
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
homepage = "https://wiki.gnome.org/Apps/Klotski";
|
|
description = "Slide blocks to solve the puzzle";
|
|
maintainers = teams.gnome.members;
|
|
license = licenses.gpl2;
|
|
platforms = platforms.linux;
|
|
};
|
|
}
|