New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shared-mime-info: 1.13.1 -> 2.1 #126050
shared-mime-info: 1.13.1 -> 2.1 #126050
Conversation
cc @mimame |
Comparing the outputs of the old and new package, you probably need to run Network also is not needed, you just need the appropriate dependencies ( Lastly, could you please add freedesktop team to maintainers, diff --git a/pkgs/data/misc/shared-mime-info/default.nix b/pkgs/data/misc/shared-mime-info/default.nix
index fefb7355ba3..63713d03e6d 100644
--- a/pkgs/data/misc/shared-mime-info/default.nix
+++ b/pkgs/data/misc/shared-mime-info/default.nix
@@ -1,4 +1,5 @@
-{ lib, stdenv
+{ stdenv
+, lib
, fetchurl
, fetchpatch
, meson
@@ -20,6 +21,15 @@ stdenv.mkDerivation rec {
sha256 = "0qw59rixlilrfzz730c55y8wzsbp7qzpn469yb83bs44vpy0rm5j";
};
+ patches = [
+ # xmlto is only used for building spec, which is not installed anyway.
+ (fetchpatch {
+ name = "xmlto-optional.patch";
+ url = "https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/110.patch";
+ sha256 = "0p5gxlcmn8ji5bc7pd105s1halqwa1d28lfx9yj43rn6mav7allx";
+ })
+ ];
+
nativeBuildInputs = [
meson
ninja
@@ -35,18 +45,15 @@ stdenv.mkDerivation rec {
glib
];
- # using xmlto involves using the network
- patches = [(fetchpatch {
- name = "xmlto-optional.patch";
- url = "https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/110.patch";
- sha256 = "0p5gxlcmn8ji5bc7pd105s1halqwa1d28lfx9yj43rn6mav7allx";
- })];
+ mesonFlags = [
+ "-Dupdate-mimedb=true"
+ ];
meta = with lib; {
description = "A database of common MIME types";
homepage = "http://freedesktop.org/wiki/Software/shared-mime-info";
license = licenses.gpl2Plus;
platforms = platforms.unix;
- maintainers = [ maintainers.mimame ];
+ maintainers = teams.freedesktop.members ++ [ maintainers.mimame ];
};
} |
Also this needs to target staging branch since it causes a mass rebuild. |
caa717a
to
1027bc5
Compare
I've tried out github's "change base branch" feature to not have to open a new PR and apparently it requested tons of reviews as a result... sorry for the inbox spam. |
1027bc5
to
fe02994
Compare
|
||
src = fetchurl { | ||
url = "https://gitlab.freedesktop.org/xdg/${pname}/uploads/5349e18c86eb96eee258a5c1f19122d0/${pname}-${version}.tar.xz"; | ||
sha256 = "1bic8z5nz08qxv1x6zlxnx2j4cmlzm12kygrn3rrh1djqxdhma3f"; | ||
url = "https://gitlab.freedesktop.org/xdg/${pname}/uploads/0ee50652091363ab0d17e335e5e74fbe/${pname}-${version}.tar.xz"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url = "https://gitlab.freedesktop.org/xdg/${pname}/uploads/0ee50652091363ab0d17e335e5e74fbe/${pname}-${version}.tar.xz"; | |
url = "https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/0ee50652091363ab0d17e335e5e74fbe/shared-mime-info-${version}.tar.xz"; |
Also why is this not using fetchFromGitLab?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you supposed to avoid pname? I'm very new to this so I have no idea. Also, I've adopted fetchFromGitlab
now, using ${pname}
, but can change it if requested.
fe02994
to
9b197f1
Compare
51a7c49
to
0677cfc
Compare
I've tried building the |
0677cfc
to
2a5b615
Compare
https://gitlab.freedesktop.org/xdg/shared-mime-info/-/tags/2.1 https://gitlab.freedesktop.org/xdg/shared-mime-info/-/releases#2.1 Also add the freedesktop team to the maintainers.
2a5b615
to
59adc6c
Compare
This has been on my to-do list for the past year so thanks for tackling this 😸 |
Note that this does break cross-compilation. I'll see if I can do anything about that. The first thing that I see is that libxml2 seems to be required in the nativeBuildInputs now, but after that it tries to run the update-mimedb tool, which is not configured correctly in meson as a tool that might need to be run on the 'build' platform (the terminology keeps confusing me...). That's something that (ideally) needs to be addressed upstream though, I'll check if I can convince them to fix that :). shared-mime-info 1.13.1 did seem to cross-compile ok. |
I've made a PR upstream: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/136, hope that gets accepted and then it should be good again 👍. Seems that it was a relatively easy fix. |
Motivation for this change
Prior update was in #68732 . The main motivation: #125920 (no idea yet whether it's of any help tho)
https://gitlab.freedesktop.org/xdg/shared-mime-info/-/tags/2.1
https://gitlab.freedesktop.org/xdg/shared-mime-info/-/releases#2.1
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)