-
-
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
Merged
Merged
nav: init at 1.2.1 #356071
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
stdenv, | ||
lib, | ||
fetchzip, | ||
nix-update-script, | ||
autoPatchelfHook, | ||
libxcrypt-legacy, | ||
}: | ||
|
||
let | ||
system = stdenv.hostPlatform.parsed.cpu.name; | ||
platform = "${system}-unknown-linux-gnu"; | ||
in | ||
stdenv.mkDerivation rec { | ||
pname = "nav"; | ||
version = "1.2.1"; | ||
|
||
src = fetchzip { | ||
url = "https://github.com/Jojo4GH/nav/releases/download/v${version}/nav-${platform}.tar.gz"; | ||
sha256 = | ||
{ | ||
x86_64-linux = "sha256-ihn5wlagmujHlSfJpgojQNqa4NjLF1wk2pt8wHi60DY="; | ||
aarch64-linux = "sha256-l3rKu3OU/TUUjmx3p06k9V5eN3ZDNcxbxObLqVQ2B7U="; | ||
} | ||
.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}"); | ||
}; | ||
|
||
nativeBuildInputs = [ autoPatchelfHook ]; | ||
buildInputs = [ | ||
stdenv.cc.cc.lib | ||
libxcrypt-legacy | ||
]; | ||
|
||
installPhase = '' | ||
runHook preInstall | ||
|
||
mkdir -p $out/bin | ||
cp nav $out/bin | ||
|
||
runHook postInstall | ||
''; | ||
|
||
passthru.updateScript = nix-update-script { }; | ||
|
||
meta = { | ||
description = "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 = [ lib.sourceTypes.binaryNativeCode ]; | ||
mainProgram = "nav"; | ||
}; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:(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
, andgradleFlags
, but all of them failed at the dependency download or building step. @Jojo4GH's theory was that the dependency resolution does not work forcommon
architectures, failing at downloadingkotlin-stdlib:2.0.0
forarm64
.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 thev2
version, and if successful that can go as a separate PR once this is merged