Skip to content

MediaHarbor: init at 2.1.0 - #550041

Open
idkdontaskm3 wants to merge 2 commits into
NixOS:masterfrom
idkdontaskm3:add-mediaharbor
Open

MediaHarbor: init at 2.1.0#550041
idkdontaskm3 wants to merge 2 commits into
NixOS:masterfrom
idkdontaskm3:add-mediaharbor

Conversation

@idkdontaskm3

Copy link
Copy Markdown

Things done

Fetched and built MediaHarbor package. - Pulled Cargo.lock and github repo
(probably not the best way to do it but wtvr) and built with rustPlatform.buildRustPackage.

NOTE : i have not added any maintainers or maintainer list related stuff yet
because I have another active PR with the maintainer list, if this is not what I
be doing, please mention so. thx :3

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • aarch64-darwin
  • Tested, as applicable:
    • [NixOS tests] in [nixos/tests].
    • [Package tests] at passthru.tests.
    • Tests in [lib/tests] or [pkgs/test] for functions and "core" functionality.
  • Ran nixpkgs-review on this PR. See [nixpkgs-review usage].
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits [CONTRIBUTING.md], [pkgs/README.md], [maintainers/README.md] and other READMEs.
  • Follows the [automation/AI policy].

@idkdontaskm3
idkdontaskm3 force-pushed the add-mediaharbor branch 2 times, most recently from d37f8be to 3a27d8a Compare August 6, 2026 23:53
@nixpkgs-ci nixpkgs-ci Bot added 8.has: package (new) This PR adds a new package 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.first-time contribution This PR is the author's first one; please be gentle! 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Aug 6, 2026

@RossSmyth RossSmyth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good start. Does this need cargo-tauri or does it work fine without it?

Comment on lines +23 to +26
zlib,
...
}:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need a wildcard, the exact requested packages will always be supplied.

Suggested change
zlib,
...
}:
zlib,
}:

Comment thread pkgs/by-name/me/mediaharbor/package.nix Outdated
...
}:

rustPlatform.buildRustPackage rec {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use finalAttrs, and not rec as it integrates with the override system, while rec does not.

Suggested change
rustPlatform.buildRustPackage rec {
rustPlatform.buildRustPackage (finalAttrs: {

Comment thread pkgs/by-name/me/mediaharbor/package.nix Outdated
}:

rustPlatform.buildRustPackage rec {
pname = "MediaHarbor";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should usually match the attribute name, so it should be lowercase.

Suggested change
pname = "MediaHarbor";
pname = "mediaharbor";

Comment thread pkgs/by-name/me/mediaharbor/package.nix Outdated
src = fetchFromGitHub {
owner = "MediaHarbor";
repo = "mediaharbor";
rev = "v${version}";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use tag, so using rev gives GitHub a chance to fetch the incorrect thing (if shortened hashes line up with a tag name)

Suggested change
rev = "v${version}";
tag = "v${version}";

Comment thread pkgs/by-name/me/mediaharbor/Cargo.lock Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there is a Cargo.lock upstream, so this shouldn't be needed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should i keep the lockFIle = ./Cargo.lock or will that cause issues? I feel like keeping its correct but I would like to minimize rebuilding this package.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, please remove the vendored lockfile.

Comment on lines +44 to +47
cargoBuildFlags = [
"--manifest-path"
"src/app/Cargo.toml"
];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than manifest-path this should be "-p" "your-crate-here"

Comment thread pkgs/by-name/me/mediaharbor/package.nix Outdated
Comment on lines +57 to +69
PKG_CONFIG_PATH = lib.makeSearchPath "lib/pkgconfig" [
atk.dev
cairo.dev
dbus.dev
gdk-pixbuf.dev
glib.dev
gtk3.dev
harfbuzz.dev
libsoup_3.dev
pango.dev
webkitgtk_4_1.dev
zlib.dev
];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is done for you. No need to specify the dev outputs either. Just place these packages in buildInputs and it should just work as long as pkg-config is in nativeBuildInputs.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason it would not build without manually adding them to the path, I wasted like 2 hours just adding them to buildinputs and removing them, package config just could not find them unless manually adding them with the .dev as well, ill try building without again, but this may need to stay.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If that is the case then there is something else wrong.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed it myself and it works fine.

Comment thread pkgs/by-name/me/mediaharbor/package.nix Outdated
npm run build:react -- --outDir dist-react
'';

meta = with lib; {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use with lib;, there is an ongoing intiative to remove this in nixpkgs as it has a measurable eval slowdown across all packages.

Suggested change
meta = with lib; {
meta = {

Comment thread pkgs/by-name/me/mediaharbor/package.nix Outdated
nativeBuildInputs = [
nodejs
npmHooks.npmConfigHook
npmHooks.npmInstallHook

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npmInstallHook overrides the install phase. Does the package still install properly? If not disable the override (check the nixpkgs reference) and put it in pre or post install.

description = "Cross-platform Media Ripping and Browsing GUI";
homepage = "https://mediaharbor.org/";
license = licenses.gpl3Only;
mainProgram = "mediaharbor";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This package will not be merged without a maintainer.

@RossSmyth

Copy link
Copy Markdown
Contributor

re: maintainers list in a seperate PR

just put yourself on the maintainers list in one PR, no need for two.

@idkdontaskm3

Copy link
Copy Markdown
Author

Im currently rebuilding for other reasons (I forgot to add a desktop file) but it does seem to work quite well, but it will probably take a few hours for me to get anything done as it takes 30 minutes for me to build the package (old intel laptop :/)

@nixpkgs-ci nixpkgs-ci Bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Aug 7, 2026
@RossSmyth

Copy link
Copy Markdown
Contributor

Building it myself, yes cargo-tauri is used upstream and it must be used in this derivation. Otherwise some dependencies are not properly propagated (gstreamer primarily)

@RossSmyth RossSmyth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some other things I noticed while messing with it.

I also noticed it has some optional runtime dependencies

  • Python
  • Bento4

So those can be provided if you want to.

typescript
wrapGAppsHook3
];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also need libgit2 in buildInputs and env.LIBGIT2_NO_VENDOR = true so that Nixpkgs libgit2 is used and not the vendored one

Comment thread pkgs/by-name/me/mediaharbor/package.nix Outdated
Comment on lines +77 to +78
wrapGAppsHook3
];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is needed for proper dependency propagation. This is also how it is built upstream, and we should replicate what upstream does as close as we can.

Suggested change
wrapGAppsHook3
];
wrapGAppsHook3
cargo-tauri.hook
];

Comment on lines +84 to +85
zlib
];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This package also requires the base gst plugins or else it gets unhappy

Suggested change
zlib
];
zlib
gst_all_1.gst-plugins-base
];

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright, i just woke up, ill probably spend like 5 hours on it today (unless stuff goes really well) thx for the help :3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants