Skip to content

findup: init at 1.0#154860

Merged
onny merged 1 commit intoNixOS:masterfrom
booniepepper:init/findup
Sep 5, 2022
Merged

findup: init at 1.0#154860
onny merged 1 commit intoNixOS:masterfrom
booniepepper:init/findup

Conversation

@booniepepper
Copy link
Contributor

@booniepepper booniepepper commented Jan 13, 2022

Motivation for this change

Imports findup - a utility for searching through parents.

Comes in handy when in some nested directory but you want to traverse back up.

Example: if you're deep in some npm project, instead of cd ../../../../.. you can do something like cd $(findup package.json).

Also useful for finding things like the nearest .git directory, nearest .envrc for direnv, or similar for pipenv, rbenv, asdf .tool-versions file, etc.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@booniepepper booniepepper self-assigned this Jan 13, 2022
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Jan 13, 2022
@booniepepper booniepepper force-pushed the init/findup branch 3 times, most recently from c8c9895 to f7b5df2 Compare January 13, 2022 10:02
@booniepepper
Copy link
Contributor Author

booniepepper commented Jan 15, 2022

Note: The two "neutral" checks are because zig 0.9.0 is marked as "broken" for darwin platforms.

I see zig 0.9.0 being introduced here #152163

@booniepepper booniepepper marked this pull request as draft February 3, 2022 18:59
@booniepepper
Copy link
Contributor Author

I marked findup as "broken" for darwin platforms with some comments on where to watch.

Most likely #86299 will get done before Zig starts supporting older macOS versions, and then this should "just work" on darwin as well.

Comment on lines 39 to 42
Copy link
Contributor

Choose a reason for hiding this comment

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

If this broken is only because of Zig compiler then you should leave it without. Nix is clevar enough to set broken for packages that require zig.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh thanks, I didn't know!

@applePrincess
Copy link
Contributor

Result of nixpkgs-review pr 154860 run on x86_64-linux 1

1 package built:
  • findup

@applePrincess
Copy link
Contributor

[nix-shell:~/.cache/nixpkgs-review/pr-154860-2]$ ls
build.nix  logs  nixpkgs  report.json  report.md  results  shell.nix

[nix-shell:~/.cache/nixpkgs-review/pr-154860-2]$ cd results/

[nix-shell:~/.cache/nixpkgs-review/pr-154860-2/results]$ ./findup/bin/findup build.nix
/home/alice/.cache/nixpkgs-review/pr-154860-2

looks good to me.

@onny
Copy link
Contributor

onny commented Sep 5, 2022

Result of nixpkgs-review pr 154860 run on x86_64-linux 1

1 package built:
  • findup

@onny onny merged commit 963e4e9 into NixOS:master Sep 5, 2022
@onny
Copy link
Contributor

onny commented Sep 5, 2022

Thank you!

@github-actions
Copy link
Contributor

github-actions bot commented Sep 5, 2022

Successfully created backport PR #189861 for release-22.05.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants