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

obb: init at 0.0.1 #153496

Merged
merged 2 commits into from
Jan 4, 2022
Merged

obb: init at 0.0.1 #153496

merged 2 commits into from
Jan 4, 2022

Conversation

willcohen
Copy link
Contributor

@willcohen willcohen commented Jan 4, 2022

Motivation for this change

Add initial release of obb, a Mac scripting tool built off of babashka.

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.

pkgs/development/interpreters/clojure/obb.nix Outdated Show resolved Hide resolved
pkgs/development/interpreters/clojure/obb.nix Outdated Show resolved Hide resolved
pkgs/development/interpreters/clojure/obb.nix Outdated Show resolved Hide resolved
pkgs/development/interpreters/clojure/obb.nix Outdated Show resolved Hide resolved
pkgs/development/interpreters/clojure/obb.nix Outdated Show resolved Hide resolved
maintainers/maintainer-list.nix Outdated Show resolved Hide resolved
@willcohen
Copy link
Contributor Author

willcohen commented Jan 4, 2022

@legendofmiracles many thanks for the review, changes incorporated with 0c886c5!

@willcohen
Copy link
Contributor Author

willcohen commented Jan 4, 2022

@thiagokokada I included you as maintainer since you're on babashka too, but don't feel obliged. I just felt a little strange adding myself as the only maintainer for a new package!

pkgs/development/interpreters/clojure/obb.nix Outdated Show resolved Hide resolved
pkgs/development/interpreters/clojure/obb.nix Outdated Show resolved Hide resolved
pkgs/development/interpreters/clojure/obb.nix Outdated Show resolved Hide resolved
pkgs/development/interpreters/clojure/obb.nix Outdated Show resolved Hide resolved
@willcohen
Copy link
Contributor Author

willcohen commented Jan 4, 2022

@thiagokokada review comments adopted in latest commit. thanks again!

@legendofmiracles updated test now actually tests for a working install -- similar to macvim's path issues, osascript needed to be symlinked into $out for the test to pass, since it wasn't being found otherwise (though it still works on darwin for the end user). also moved it back to installCheckPhase per @thiagokokada's second review to avoid the circular dependency, but now it actually tests correctly.

@thiagokokada
Copy link
Contributor

I can at least give a try of this PR in my VM and see if it build/works.

@willcohen
Copy link
Contributor Author

Result of nixpkgs-review pr 153496 run on x86_64-darwin 1

1 package built:
  • obb

1 similar comment
@thiagokokada
Copy link
Contributor

Result of nixpkgs-review pr 153496 run on x86_64-darwin 1

1 package built:
  • obb

@thiagokokada
Copy link
Contributor

Ran the example from README:

$ obb -e '(-> (js/Application "Safari") (.-documents) (aget 0) (.url))'
https://www.apple.com/

Seems to work fine.

@thiagokokada thiagokokada merged commit 41f37d9 into NixOS:master Jan 4, 2022
@willcohen
Copy link
Contributor Author

Thank you!

@legendofmiracles
Copy link
Contributor

legendofmiracles commented Jan 4, 2022

Some things I didn't have a chance to review since the last changes.
src should be fetchFromGitHub now that we aren't downloading a binary release.

I disagree with moving the tests, the passthru.tests exists for a reason and many derivations rely on themselves (note that it's not a circular dependency). Although there is a case to be made that being forced to create a $out file makes things more ugly and unnecessarily complicated.
I didn't have a chance to see for my own why 0.0.1 wouldn't work with testVersion.

I do appreciate the work though, @willcohen. Will open another PR when I have the time.

@thiagokokada
Copy link
Contributor

Some things I didn't have a chance to review since the last changes. src should be fetchFromGitHub now that we aren't downloading a binary release.

Sure, this is something that I didn't consider. Can be fixed later though, and it is a minor issue.

I disagree with moving the tests, the passthru.tests exists for a reason and many derivations rely on themselves (note that it's not a circular dependency). Although there is a case to be made that being forced to create a $out file makes things more ugly and unnecessarily complicated. I didn't have a chance to see for my own why 0.0.1 wouldn't work with testVersion.

What is the issue with installCheckPhase though? Legit question since I never saw any reviewer implicating with its usage.

Also, I know about passthru.tests, however AFAIK they're mostly used for when you have a test in nixos/tests and you want to also run those tests when the package is updated. Not really the case here though.

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

Successfully merging this pull request may close these issues.

3 participants