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

heliocron: init at 0.8.1 #338936

Merged
merged 2 commits into from
Sep 6, 2024
Merged

heliocron: init at 0.8.1 #338936

merged 2 commits into from
Sep 6, 2024

Conversation

TheColorman
Copy link
Contributor

Description of changes

heliocron is a program that delays execution of subsequent commands based on the sunset/sunrise at a given location.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 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
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@TheColorman
Copy link
Contributor Author

I'd love to try and build it for aarch64-linux, but I'm not sure how to do so (and test the result) on an x86_64-linux machine. According to the heliocron README, aarch64 support should be good.

@kirillrdy
Copy link
Member

I'd love to try and build it for aarch64-linux, but I'm not sure how to do so (and test the result) on an x86_64-linux machine. According to the heliocron README, aarch64 support should be good.

i use binfmt on x86 to build and run aarch64-linux

https://search.nixos.org/options?channel=24.05&from=0&size=50&sort=relevance&type=packages&query=boot.binfmt.emulatedSystems

from CI you can see that heliocron builds fine on aarch64-linux
image

@kirillrdy
Copy link
Member

[nix-shell:~/.cache/nixpkgs-review/pr-338936]$ file ./results/heliocron/bin/heliocron 
./results/heliocron/bin/heliocron: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /nix/store/5qfsgr600bry4a6431w311jv4a73v8js-glibc-2.39-52/lib/ld-linux-aarch64.so.1, for GNU/Linux 3.10.0, not stripped
[nix-shell:~/.cache/nixpkgs-review/pr-338936]$ ./results/heliocron/bin/heliocron 
heliocron 0.8.1
A simple program for calculating sunrise, sunset and related times, which can be integrated with
cron to trigger other programs to run when these events occur

USAGE:
    heliocron [OPTIONS] <SUBCOMMAND>

OPTIONS:
    -d, --date <DATE>              Set the date for which the calculations should be run. If
                                   specified, it should be in 'yyyy-mm-dd' format, otherwise it
                                   defaults to the the current local date [default: 2024-09-02]
    -h, --help                     Print help information
    -l, --latitude <LATITUDE>      Set the latitude in decimal degrees. Positive values to the
                                   north; negative values to the south. Defaults to '51.4769' if not
                                   otherwise specified here or in ~/.config/heliocron.toml
    -o, --longitude <LONGITUDE>    Set the longitude in decimal degrees. Positive values to the
                                   east; negative values to the west. Defaults to '-0.0005' if not
                                   otherwise specified here or in ~/.config/heliocron.toml
    -t, --time-zone <TIME_ZONE>    Set the time zone. If specified, it should be in the format
                                   '[+/-]HH:MM', otherwise it defaults to the current local time
                                   zone [default: +10:00]
    -V, --version                  Print version information

SUBCOMMANDS:
    help      Print this message or the help of the given subcommand(s)
    poll      Display real time data pertaining to the Sun at the current local time
    report    Produce a full set of sunrise, sunset and other related times for the given date
                  and location
    wait      Set a delay timer which will expire when the chosen event (+/- optional offset)
                  occurs

@TheColorman
Copy link
Contributor Author

i use binfmt on x86 to build and run aarch64-linux

Oh nice, that's really cool! Thanks.

@kirillrdy
Copy link
Member

@TheColorman can you please squash your commits into heliocron: init at 0.8.1, so there should be just two commits

  • maintainers: add TheColorman
  • heliocron: init at 0.8.1

usually multiple commits is fine, but for init PR's and when commits are so small, it's better to reduce noise.

Command line application for delaying execution of other commands relative to sunrise and sunset

https://github.com/mfreeborn/heliocron
@kirillrdy kirillrdy merged commit 59910df into NixOS:master Sep 6, 2024
26 of 27 checks passed
@kirillrdy
Copy link
Member

thank you !

@TheColorman
Copy link
Contributor Author

Guess I can call myself a nixpkgs maintainer now 😅

@TheColorman TheColorman deleted the add-heliocron branch September 6, 2024 02:18
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.

4 participants