Skip to content
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

draft: hunter: init at 1.3.5 #99898

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
66 changes: 66 additions & 0 deletions pkgs/applications/misc/hunter/default.nix
@@ -0,0 +1,66 @@
{ stdenv
, callPackage
, makeRustPlatform
, fetchFromGitHub
, IOKit ? null
Copy link
Member

Choose a reason for hiding this comment

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

Please use inherit in top-level to not default this to null cause this will always fail on darwin.

, makeWrapper
, glib
, gst_all_1
, libsixel
}:

assert stdenv.isDarwin -> IOKit != null;
Comment on lines +11 to +12
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
assert stdenv.isDarwin -> IOKit != null;


let
date = "2020-05-22";
Copy link
Member

Choose a reason for hiding this comment

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

Is the current rust version in nix now sufficient?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nothing changed upstream since May 25.
Shall I mark this PR as WIP until upstream doesn't need nightly anymore?

Copy link
Member

Choose a reason for hiding this comment

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

Yes please. I don't think it is a good idea to include the overlay in nix.

mozillaOverlay = fetchFromGitHub {
owner = "mozilla";
repo = "nixpkgs-mozilla";
rev = "e912ed483e980dfb4666ae0ed17845c4220e5e7c";
sha256 = "08fvzb8w80bkkabc1iyhzd15f4sm7ra10jn32kfch5klgl0gj3j3";
};
mozilla = callPackage "${mozillaOverlay.out}/package-set.nix" {};
rustNightly = (mozilla.rustChannelOf { inherit date; channel = "nightly"; }).rust;
rustPlatform = makeRustPlatform {
cargo = rustNightly;
rustc = rustNightly;
};
in
rustPlatform.buildRustPackage rec {
pname = "hunter";
version = "1.3.5";

src = fetchFromGitHub {
owner = "rabite0";
repo = "hunter";
rev = "v${version}";
sha256 = "0z28ymz0kr726zjsrksipy7jz7y1kmqlxigyqkh3pyh154b38cis";
};

RUSTC_BOOTSTRAP=1;

nativeBuildInputs = [ makeWrapper ];
buildInputs = [
glib
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-ugly
gst_all_1.gst-plugins-bad
libsixel
] ++ stdenv.lib.optionals stdenv.isDarwin [ IOKit ];

postInstall = ''
wrapProgram $out/bin/hunter --prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "$GST_PLUGIN_SYSTEM_PATH_1_0"
'';

cargoSha256 = "18ycj1f310s74gkjz2hh4dqzjb3bnxm683968l1cbxs7gq20jzx6";

meta = with stdenv.lib; {
description = "The fastest file manager in the galaxy!";
homepage = "https://github.com/rabite0/hunter";
license = licenses.wtfpl;
maintainers = [ maintainers.magnetophon ];
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
maintainers = [ maintainers.magnetophon ];
maintainers = with maintainers; [ magnetophon ];

platforms = platforms.unix;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Expand Up @@ -21233,6 +21233,8 @@ in

hugo = callPackage ../applications/misc/hugo { };

hunter = callPackage ../applications/misc/hunter { };

hydrogen = qt5.callPackage ../applications/audio/hydrogen { };
hydrogen_0 = callPackage ../applications/audio/hydrogen/0.nix { }; # Old stable, has GMKit.

Expand Down