nixpkgs/pkgs/by-name/gl/glabels/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

52 lines
1.6 KiB
Nix

{ lib, stdenv, fetchurl, fetchpatch, barcode, gnome, gnome-common, autoreconfHook
, gtk3, gtk-doc, libxml2, librsvg , libtool, libe-book, gsettings-desktop-schemas
, intltool, itstool, makeWrapper, pkg-config, yelp-tools, qrencode
}:
stdenv.mkDerivation rec {
pname = "glabels";
version = "3.4.1";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "0f2rki8i27pkd9r0gz03cdl1g4vnmvp0j49nhxqn275vi8lmgr0q";
};
patches = [
# Pull patch pending upstream inclusion for -fno-common toolchain support:
# https://github.com/jimevins/glabels/pull/76
(fetchpatch {
name = "fno-common.patch";
url = "https://github.com/jimevins/glabels/commit/f64e3f34e3631330fff2fb48ab271ff9c6160229.patch";
sha256 = "13q6g4bxzvzwjnvzkvijds2b6yvc4xqbdwgqnwmj65ln6ngxz8sa";
})
];
nativeBuildInputs = [ autoreconfHook pkg-config makeWrapper intltool ];
buildInputs = [
barcode gtk3 gtk-doc yelp-tools
gnome-common gsettings-desktop-schemas
itstool libxml2 librsvg libe-book libtool qrencode
];
preFixup = ''
wrapProgram "$out/bin/glabels-3" \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH"
'';
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
versionPolicy = "none";
};
};
meta = with lib; {
description = "Create labels and business cards";
homepage = "https://github.com/jimevins/glabels";
license = with licenses; [ gpl3Plus lgpl3Plus ];
platforms = platforms.unix;
maintainers = [ maintainers.nico202 ];
};
}