Merge pull request #138736 from Artturin/vartopy3

menumaker,gnome-doc-utils: switch to python3
This commit is contained in:
Artturi 2021-09-26 04:03:21 +03:00 committed by GitHub
commit bd2cc001bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 19 deletions

View file

@ -1,12 +1,12 @@
{ lib, fetchurl, python2Packages }:
{ lib, fetchurl, python3Packages }:
python2Packages.buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
pname = "menumaker";
version = "0.99.12";
version = "0.99.13";
src = fetchurl {
url = "mirror://sourceforge/menumaker/${pname}-${version}.tar.gz";
sha256 = "034v5204bsgkzzk6zfa5ia63q95gln47f7hwf96yvad5hrhmd8z3";
sha256 = "sha256-JBXs5hnt1snbnB1hi7q7HBI7rNp0OoalLeIM0uJCdkE=";
};
format = "other";

View file

@ -1,7 +1,7 @@
{ lib, fetchurl, pkg-config, libxml2Python, libxslt, intltool, gnome
, python2Packages }:
{ lib, fetchurl, pkg-config, libxml2, libxslt, intltool, gnome
, python3Packages, fetchpatch, bash }:
python2Packages.buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
pname = "gnome-doc-utils";
version = "0.20.10";
@ -12,28 +12,31 @@ python2Packages.buildPythonApplication rec {
sha256 = "19n4x25ndzngaciiyd8dd6s2mf9gv6nv3wv27ggns2smm7zkj1nb";
};
patches = [
# https://bugzilla.redhat.com/show_bug.cgi?id=438638
(fetchpatch {
url = "https://src.fedoraproject.org/rpms/gnome-doc-utils/raw/6b8908abe5af61a952db7174c5d1843708d61f1b/f/gnome-doc-utils-0.14.0-package.patch";
sha256 = "sha256-V2L2/30NoHY/wj3+dsombxveWRSUJb2YByOKtEgVx/0=";
})
# python3 support
(fetchpatch {
url = "https://src.fedoraproject.org/rpms/gnome-doc-utils/raw/6b8908abe5af61a952db7174c5d1843708d61f1b/f/gnome-doc-utils-0.20.10-python3.patch";
sha256 = "sha256-niH/Yx5H44rsRgkCZS8LWLFB9ZvuInt75zugzoVUhH0=";
})
];
nativeBuildInputs = [ intltool pkg-config libxslt.dev ];
buildInputs = [ libxslt ];
buildInputs = [ libxml2 libxslt bash ];
propagatedBuildInputs = [ python3Packages.libxml2 ];
configureFlags = [ "--disable-scrollkeeper" ];
preBuild = ''
substituteInPlace xml2po/xml2po/Makefile --replace '-e "s+^#!.*python.*+#!$(PYTHON)+"' '-e "s\"^#!.*python.*\"#!$(PYTHON)\""'
'';
propagatedBuildInputs = [ libxml2Python ];
passthru = {
updateScript = gnome.updateScript {
packageName = pname;
};
};
postFixup = ''
# Do not propagate Python
rm $out/nix-support/propagated-build-inputs
'';
meta = with lib; {
description = "Collection of documentation utilities for the GNOME project";
homepage = "https://gitlab.gnome.org/GNOME/gnome-doc-utils";