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

Add hunter (file manager) package #83554

Closed
TannerYoung opened this issue Mar 28, 2020 · 11 comments
Closed

Add hunter (file manager) package #83554

TannerYoung opened this issue Mar 28, 2020 · 11 comments

Comments

@TannerYoung
Copy link

Project description
"The fastest file manager in the galaxy!" - aka the ranger file manager rewritten async in rust.

Metadata

Possible Package Definition

{ stdenv, rustPlatform, fetchFromGitHub, IOKit }:                                                                                             
                                                                                                                                              
assert stdenv.isDarwin -> IOKit != null;                                                                                                      
                                                                                                                                              
rustPlatform.buildRustPackage rec {                                                                                                           
  pname = "hunter-filemanager";                                                                                                               
  version = "1.3.5";                                                                                                                          
                                                                                                                                              
  src = fetchFromGitHub {                                                                                                                     
    owner = "rabite0";                                                                                                                        
    repo = "hunter";                                                                                                                          
    rev = version;                                                                                                                            
    sha256 = "7583e0a16e541a72cd87020414cdc53eddc958f6";                                                                                      
  };                                                                                                                                          
                                                                                                                                              
  buildInputs = stdenv.lib.optionals stdenv.isDarwin [ IOKit ];                                                                               
                                                                                                                                              
  cargoSha256 = "0wmlmkq4y2923i5kjhprw2hd2v5qls49ncs6h8g9rdlmwd7qdl86";                                                                       
                                                                                                                                              
  meta = with stdenv.lib; {                                                                                                                   
    description = "The fastest file manager in the galaxy!";                                                                                  
    homepage = https://github.com/rabite0/hunter;                                                                                             
    license = licenses.wtfpl;                                                                                                                 
    maintainers = ???                                                                                                                         
    platforms = platforms.unix;                                                                                                               
  };                                                                                                                                          
}  

Sorry I can't create a PR myself - I do not have permission from my employer to contribute to open source code.

@teto
Copy link
Member

teto commented Mar 30, 2020

{ stdenv
, callPackage
, makeRustPlatform
, fetchFromGitHub, IOKit ? null
}:

assert stdenv.isDarwin -> IOKit != null;

let
  # date = "2020-3-30";
  date = "2019-07-30";
  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-filemanager";
  version = "1.3.5";

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

  RUSTC_BOOTSTRAP=1;

  buildInputs = stdenv.lib.optionals stdenv.isDarwin [ IOKit ];

  cargoSha256 = "0qnvw4n49m9shpql8bh3l19iymkfbbsd548gm1p7k26c2n9iwc7y";

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


fails with


Compiling async_value v0.2.5
   Compiling image v0.21.3
error[E0658]: use of unstable library feature 'mem_take'
   --> src/files.rs:214:38
    |
214 |                             false => std::mem::take(&mut old_buffer[old_pos])
    |                                      ^^^^^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/61129
    = help: add `#![feature(mem_take)]` to the crate attributes to enable

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: Could not compile `hunter`.
warning: build failed, waiting for other jobs to finish...
error: linking with `/nix/store/1wb31gzrjw055xl6d3igzj1gnajzlwbk-gcc-wrapper-9.2.0/bin/cc` failed: exit code: 1
  |
  = note: "/nix/store/1wb31gzrjw055xl6d3igzj1gnajzlwbk-gcc-wrapper-9.2.0/bin/cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/nix/store/hwn3m07h6alkrw8f4pw3bkc990h4543l-rust-1.38.0-nightly-2019-07-29-04b88a9eb/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/build/source/target/x86_64-unknown-linux-gnu/release/deps/hunter_media-4fb235d29ea98d62.hunter_media.cg9z37q3-cgu.0.rcgu.o" "-o" "/build/source/target/x86_64-unknown-linux-gnu/release/deps/hunter_media-4fb235d29ea98d62" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/build/source/target/x86_64-unknown-linux-gnu/release/deps" "-L" "/build/source/target/release/deps" "-L" "/build/source/target/x86_64-unknown-linux-gnu/release/build/backtrace-sys-17dc6065238b858c/out" "-L" "/build/source/target/x86_64-unknown-linux-gnu/release/build/sixel-sys-14e93ede716e855a/out/lib" "-L" "/nix/store/hwn3m07h6alkrw8f4pw3bkc990h4543l-rust-1.38.0-nightly-2019-07-29-04b88a9eb/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/build/rustcIX3ozN/libbacktrace_sys-542bcc0a801333ad.rlib" "-Wl,--start-group" "/build/rustcIX3ozN/libbacktrace_sys-8a69cc14f6a9e6ef.rlib" "-Wl,--end-group" "/nix/store/fy4s629zgxb6gf3m65xmh3g5c48ylbxx-rust/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-885d1467d513261b.rlib" "-Wl,-Bdynamic" "-lsixel" "-lgstvideo-1.0" "-lgstapp-1.0" "-lgstbase-1.0" "-lgstreamer-1.0" "-lgobject-2.0" "-lgobject-2.0" "-lglib-2.0" "-lutil" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
  = note: /nix/store/nfs9wf6ipffr9g9ylzb4i9c1i607nxvq-binutils-2.31.1/bin/ld: cannot find -lgstvideo-1.0
          /nix/store/nfs9wf6ipffr9g9ylzb4i9c1i607nxvq-binutils-2.31.1/bin/ld: cannot find -lgstapp-1.0
          /nix/store/nfs9wf6ipffr9g9ylzb4i9c1i607nxvq-binutils-2.31.1/bin/ld: cannot find -lgstbase-1.0
          /nix/store/nfs9wf6ipffr9g9ylzb4i9c1i607nxvq-binutils-2.31.1/bin/ld: cannot find -lgstreamer-1.0
          /nix/store/nfs9wf6ipffr9g9ylzb4i9c1i607nxvq-binutils-2.31.1/bin/ld: cannot find -lgobject-2.0
          /nix/store/nfs9wf6ipffr9g9ylzb4i9c1i607nxvq-binutils-2.31.1/bin/ld: cannot find -lgobject-2.0
          /nix/store/nfs9wf6ipffr9g9ylzb4i9c1i607nxvq-binutils-2.31.1/bin/ld: cannot find -lglib-2.0
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

error: Could not compile `hunter`.

@callahad
Copy link
Member

This derivation could likely be improved, but it works for me:

{ stdenv
, callPackage
, makeRustPlatform
, fetchFromGitHub
, IOKit ? null
, makeWrapper
, glib
, gst_all_1
, libsixel
}:

assert stdenv.isDarwin -> IOKit != null;

let
  date = "2020-05-22";
  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 = [];
    platforms = platforms.unix;
  };
}

@magnetophon
Copy link
Member

magnetophon commented Oct 6, 2020

@callahad Thanks!
Works for me. Any reason not to PR that?

@callahad
Copy link
Member

callahad commented Oct 6, 2020

I didn't submit a pull request because I don't use Hunter, so I didn't want to take on the responsibility of maintaining the derivation 🙂

Totally happy for anyone else to claim authorship and submit that as a PR, though.

magnetophon added a commit to magnetophon/nixpkgs that referenced this issue Oct 6, 2020
magnetophon added a commit to magnetophon/nixpkgs that referenced this issue Oct 13, 2020
@stale
Copy link

stale bot commented Apr 7, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Apr 7, 2021
@06kellyjac
Copy link
Member

This can be closed now @magnetophon @teto ?

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label May 15, 2021
@teto
Copy link
Member

teto commented May 15, 2021

I think hunter's development has stalled and I found it less practical than ranger but it is now part of nixpkgs so indeed let's close

@teto teto closed this as completed May 15, 2021
@06kellyjac
Copy link
Member

I think hunter's development has stalled

Yeah and it looks like joshuto is stepping up as the "rust ranger" alternative

What's the policy on removing stalled/stagnant/unmaintained packages in nixpkgs?

@teto
Copy link
Member

teto commented May 15, 2021

as long as there is a maintainer and no security issue, it can stay in (my opinion). If joshuto gets packaged and hunter's maintainer agrees, maybe joshuto can replace it.

@figsoda figsoda mentioned this issue Sep 9, 2021
12 tasks
@figsoda
Copy link
Member

figsoda commented Oct 19, 2021

Hunter is now broken and joshuto was packaged. Should we remove hunter?
cc maintainers: @fufexan

@fufexan
Copy link
Contributor

fufexan commented Oct 19, 2021

@figsoda sure, I will remove it.

@fufexan fufexan mentioned this issue Oct 29, 2021
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants