-
-
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
Add newdawn pkgs #364975
base: master
Are you sure you want to change the base?
Add newdawn pkgs #364975
Conversation
An ansi escape code cheatsheet
An extensible terminal screensaver displaying weather inspired by rain.c
A fast way to cd up n directories
Note a temporary note taking tool
A vocabulary learning tool
Send notifications and forms from your terminal
A cd quicklist interface
A wrapper to extract common archive types
An extensible project generator
A cli inside nixie-tubes
Securely delete files
Translate text using the cli
I’m facing an issue with some failing tests, specifically the Could someone help me debug this? Thanks in advance! |
It's most likely because the commit that adds you to maintainers-list.nix came after the commits where the packages are added, therefore those commits won't evaluate on their own |
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.
Welcome to Nixpkgs — theres a few things that need to be addressed
src = fetchFromGitHub { | ||
owner = "NewDawn0"; | ||
repo = "ansi"; | ||
rev = "6b6d3b991706247af90f3f72c67238144f77a928"; |
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.
Why not use a named tag?
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'm Woking on it and will submtit a cmmit with all the applied changes soon
}; | ||
buildInputs = [ zig ]; | ||
buildPhase = '' | ||
export LIBRARY_PATH=/usr/lib |
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.
? /usr/lib does not exist in Nix(OS)
mkdir -p $out/bin | ||
cp zig-out/bin/ansi $out/bin |
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.
mkdir -p $out/bin | |
cp zig-out/bin/ansi $out/bin | |
install -D zig-out/bin/ansi -t $out/bin |
mkdir -p $out/bin | ||
cp zig-out/bin/ansi $out/bin | ||
''; | ||
meta = with lib; { |
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.
Avoid with lib;
cp zig-out/bin/ansi $out/bin | ||
''; | ||
meta = with lib; { | ||
description = "A cheatsheet for ansi escape codes"; |
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.
Use proper capitalization and avoid leading articles (see pkgs/README.md)
description = "A cheatsheet for ansi escape codes"; | |
description = "Cheatsheet for ANSI escape codes"; |
shellHook = '' | ||
source $out/lib/SOURCE_ME.sh | ||
''; |
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.
What is this for?
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.
Packages like up and dirstack have a backend written in C or Rust, this binary cannot change directories. My approach to solving this problem is creating a file which when sourced provides the up and ds functions which executes the cd command the backend provides them with, thereby changing directories in the user's shell. If there is a better approach, I'll gladly change it
pkgs/by-name/di/dirstack/package.nix
Outdated
inherit meta; | ||
name = "dirStack-wrapped"; | ||
version = "1.0.0"; | ||
phases = [ "installPhase" ]; |
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.
Don't override phases. Instead set dontConfigure
, dontBuild
... to true.
pkgs/by-name/di/dirstack/package.nix
Outdated
pname = "dirStack"; | ||
version = "1.0.0"; | ||
propagatedBuildInputs = [ fzf ]; | ||
cargoLock.lockFile = "${src}/Cargo.lock"; |
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.
Why is this necessary? (Set cargoHash instead)
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 figured If I updated the package, I would have to update less since it would use the new Cargo.Lock
from the ${src}
and would thereby only have to update the Cargo.lock
. Please let me know I should change it to use cargoHash
instead of lockFile
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.
lockFile is specifically used for lock files we have vendored inside Nixpkgs for whatever reason (upstream's lockfile is missing/wrong/outdated/etc) — if you're using a lock file from the package itself, just use cargoHash.
(Also, I think using lockFile like this will introduce an import-from-derivation (IFD), which is not permitted in Nixpkgs, so there's really no reason to do this)
}; | ||
in | ||
rustPlatform.buildRustPackage { | ||
name = "nixie-clock"; |
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.
name = "nixie-clock"; | |
pname = "nixie-clock"; |
pkgs/by-name/sh/shredder/package.nix
Outdated
lib, | ||
}: | ||
buildGoModule { | ||
name = "shredder"; |
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.
name -> pname, add version
- Remove `with lib;` in meta - Improve descriptions - Add long descriptions
I applied all the suggested changes. |
Summary of Changes
Hi everyone. Over the years I've created some packages which could be useful, some of which are already in use by some of my colleagues. So I thought I'd distribute the popuplar packages.
This pull request adds the following new packages to nixpkgs:
These tools are lightweight, efficient, and designed to improve productivity in the terminal.
Things done
nix.conf
? (See Nix manualsandbox = 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.