python3Packages.mat2: 0.13.5 -> 0.14.0 (#455074)
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
diff --git a/libmat2/bubblewrap.py b/libmat2/bubblewrap.py
|
||||
index 970d5dd..5d3c0b7 100644
|
||||
--- a/libmat2/bubblewrap.py
|
||||
+++ b/libmat2/bubblewrap.py
|
||||
@@ -22,11 +22,7 @@ CalledProcessError = subprocess.CalledProcessError
|
||||
|
||||
|
||||
def _get_bwrap_path() -> str:
|
||||
- which_path = shutil.which('bwrap')
|
||||
- if which_path:
|
||||
- return which_path
|
||||
-
|
||||
- raise RuntimeError("Unable to find bwrap") # pragma: no cover
|
||||
+ return '@bwrap@'
|
||||
|
||||
|
||||
def _get_bwrap_args(tempdir: str,
|
||||
@@ -37,16 +33,11 @@ def _get_bwrap_args(tempdir: str,
|
||||
|
||||
# XXX: use --ro-bind-try once all supported platforms
|
||||
# have a bubblewrap recent enough to support it.
|
||||
- ro_bind_dirs = ['/usr', '/lib', '/lib64', '/bin', '/sbin', '/etc/alternatives', cwd]
|
||||
+ ro_bind_dirs = ['/nix/store', cwd]
|
||||
for bind_dir in ro_bind_dirs:
|
||||
if os.path.isdir(bind_dir): # pragma: no cover
|
||||
ro_bind_args.extend(['--ro-bind', bind_dir, bind_dir])
|
||||
|
||||
- ro_bind_files = ['/etc/ld.so.cache']
|
||||
- for bind_file in ro_bind_files:
|
||||
- if os.path.isfile(bind_file): # pragma: no cover
|
||||
- ro_bind_args.extend(['--ro-bind', bind_file, bind_file])
|
||||
-
|
||||
args = ro_bind_args + \
|
||||
['--dev', '/dev',
|
||||
'--proc', '/proc',
|
||||
@@ -3,54 +3,40 @@
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
pytestCheckHook,
|
||||
fetchFromGitLab,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
replaceVars,
|
||||
bubblewrap,
|
||||
exiftool,
|
||||
ffmpeg,
|
||||
setuptools,
|
||||
wrapGAppsHook3,
|
||||
gdk-pixbuf,
|
||||
gnome,
|
||||
gobject-introspection,
|
||||
librsvg,
|
||||
poppler_gi,
|
||||
webp-pixbuf-loader,
|
||||
mutagen,
|
||||
pygobject3,
|
||||
pycairo,
|
||||
dolphinIntegration ? false,
|
||||
kdePackages,
|
||||
versionCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mat2";
|
||||
version = "0.13.5";
|
||||
version = "0.14.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitLab {
|
||||
domain = "0xacab.org";
|
||||
src = fetchFromGitHub {
|
||||
owner = "jvoisin";
|
||||
repo = "mat2";
|
||||
tag = version;
|
||||
hash = "sha256-ivFgH/88DBucZRaO/OMsLlwJCjv/VQXb6AiKWhZ8XH0=";
|
||||
hash = "sha256-JTt2/PuSxOXXHUuRP42y8jxw09mNMMz1piJM4ldnjq0=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "exiftool-13.25-compat.patch";
|
||||
url = "https://0xacab.org/jvoisin/mat2/-/commit/473903b70e1b269a6110242a9c098a10c18554e2.patch";
|
||||
hash = "sha256-vxxjAFwiTDlcTT3ZlfhOG4rlzBJS+LhLoA++8y2hEok=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "fix-test-on-python313.patch";
|
||||
url = "https://0xacab.org/jvoisin/mat2/-/commit/f07344444d6d2f04a1f93e2954f4910b194bee0c.patch";
|
||||
hash = "sha256-y756sKkjGO11A2lrRsXAwWgupOZ00u0cDypvkbsiNbY=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "fix-test-on-python312.patch";
|
||||
url = "https://0xacab.org/jvoisin/mat2/-/commit/7a8ea224bc327b8ee929379d577c74968ea1c352.patch";
|
||||
hash = "sha256-pPiYhoql5WhjhLKvd6y3OnvxORSbXIGCsZMc7UH3i1Q=";
|
||||
})
|
||||
# hardcode paths to some binaries
|
||||
(replaceVars ./paths.patch {
|
||||
exiftool = lib.getExe exiftool;
|
||||
@@ -64,11 +50,6 @@ buildPythonPackage rec {
|
||||
./executable-name.patch
|
||||
# hardcode path to mat2 executable
|
||||
./tests.patch
|
||||
]
|
||||
++ lib.optionals (stdenv.hostPlatform.isLinux) [
|
||||
(replaceVars ./bubblewrap-path.patch {
|
||||
bwrap = lib.getExe bubblewrap;
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
@@ -86,7 +67,6 @@ buildPythonPackage rec {
|
||||
|
||||
buildInputs = [
|
||||
gdk-pixbuf
|
||||
librsvg
|
||||
poppler_gi
|
||||
];
|
||||
|
||||
@@ -97,6 +77,15 @@ buildPythonPackage rec {
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
export GDK_PIXBUF_MODULE_FILE="${
|
||||
gnome._gdkPixbufCacheBuilder_DO_NOT_USE {
|
||||
extraLoaders = [
|
||||
librsvg
|
||||
webp-pixbuf-loader
|
||||
];
|
||||
}
|
||||
}"
|
||||
|
||||
install -Dm 444 data/mat2.svg -t "$out/share/icons/hicolor/scalable/apps"
|
||||
install -Dm 444 doc/mat2.1 -t "$out/share/man/man1"
|
||||
''
|
||||
@@ -106,12 +95,15 @@ buildPythonPackage rec {
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
meta = with lib; {
|
||||
nativeInstallCheckInputs = [ versionCheckHook ];
|
||||
versionCheckProgramArg = "--version";
|
||||
|
||||
meta = {
|
||||
description = "Handy tool to trash your metadata";
|
||||
homepage = "https://0xacab.org/jvoisin/mat2";
|
||||
changelog = "https://0xacab.org/jvoisin/mat2/-/blob/${version}/CHANGELOG.md";
|
||||
license = licenses.lgpl3Plus;
|
||||
homepage = "https://github.com/jvoisin/mat2";
|
||||
changelog = "https://github.com/jvoisin/mat2/blob/${src.tag}/CHANGELOG.md";
|
||||
license = lib.licenses.lgpl3Plus;
|
||||
mainProgram = "mat2";
|
||||
maintainers = with maintainers; [ dotlambda ];
|
||||
maintainers = with lib.maintainers; [ dotlambda ];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user