-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
nav: init at 1.2.1 #356071
nav: init at 1.2.1 #356071
Conversation
aarch64-linux = "sha256-l3rKu3OU/TUUjmx3p06k9V5eN3ZDNcxbxObLqVQ2B7U="; | ||
} | ||
.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"); | ||
}; |
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.
Could this not be built from source, using, e.g. gradle2nix
rather than downloading the release binary?
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.
While looking for gradle2nix
, I could not find any documentation in this repository at first and thus tried to get it running with gradle. However, we could not get the build running (our latest config is shown below).
This is the reason, I looked into gradle2nix
again. The repository is currently migrating to V2 with functionality that is not (yet?) available for nixpkgs. We are currently wondering how to achieve the build and would like to know whether to stick to the binaries or if we should use:
let
gradle2nix = import (fetchTarball "https://github.com/tadfisher/gradle2nix/archive/v2.tar.gz") {};
in
gradle2nix.buildGradlePackage { ... }
(as described in the documentation for gradle2nix
)
Would love to know how to proceed or where to get further information.
Nix Config for gradle.fetchDeps
We tried many variations of this file with gradleUpdateTask
, gradleUpdateScript
, and gradleFlags
, but all of them failed at the dependency download or building step. @Jojo4GH's theory was that the dependency resolution does not work for common
architectures, failing at downloading kotlin-stdlib:2.0.0
for arm64
.
{
stdenv,
lib,
fetchFromGitHub,
gradle,
makeWrapper,
jre,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: rec {
pname = "nav";
version = "1.2.1";
src = fetchFromGitHub {
owner = "Jojo4GH";
repo = "nav";
rev = "v${version}";
hash = "sha256-rS64lvS8lBpOsNq+abqqLrX5HJsPTdVx6Akjg9S/pyQ=";
};
nativeBuildInputs = [
gradle
];
mitmCache = gradle.fetchDeps {
inherit (finalAttrs) pname;
data = ./deps.json;
};
__darwinAllowLocalNetworking = true;
installPhase = ''
runHook preInstall
# this was never reached...
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "The Interactive and Stylish Replacement for ls & cd";
longDescription = ''
To make use of nav, add the following lines to your configuration:
`programs.bash.shellInit = "eval \"$(nav --init bash)\"";` and
`programs.zsh.shellInit = "eval \"$(nav --init zsh)\"";`
'';
homepage = "https://github.com/Jojo4GH/nav";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
David-Kopczynski
Jojo4GH
];
platforms = lib.platforms.linux;
sourceProvenance = with lib.sourceTypes; [
fromSource
binaryBytecode # for gradle dependencies
];
mainProgram = "nav";
};
})
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.
I've left an approving review as I don't see any real problem with packaging it as you have, and I wouldn't want to do anything to discourage someone with the commit bit merging it
I'm curious about the new gradle2nix
though, so I'll have a try packaging with the v2
version, and if successful that can go as a separate PR once this is merged
25f6bdf
to
b896ba6
Compare
b896ba6
to
b9ad375
Compare
Thanks @FliegendeWurst for the improvements :) |
@steeleduncan I will look into |
Successfully created backport PR for |
Hello :)
I added
nav
from https://github.com/Jojo4GH/nav with the functionality of navigating files in the terminal more easily.While Jojo4GH is the project maintainer, I will help him keep this package up to date on nix. This is the reason, I added both of us to the maintainers list.
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.