Skip to content

Conversation

0xzer0x
Copy link

@0xzer0x 0xzer0x commented Oct 14, 2025

Powerful and user-friendly command-line interface (CLI) application that helps Muslims stay on top of their daily prayers. With features like prayer time notifications, prayer calendars, and flexible configuration options.

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.first-time contribution This PR is the author's first one; please be gentle! 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Oct 14, 2025
Copy link
Contributor

@yzx9 yzx9 left a comment

Choose a reason for hiding this comment

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

Welcome to nixpkgs! 👋 Thanks for your contribution.

Copy link
Contributor

Choose a reason for hiding this comment

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

Are version.buildCommit and version.buildTime required? If not, you might want to simplify the code by embedding the version directly:

buildGoModule (finalAttrs: {
  // ...
  version = "0.1.13";
  // ...
  src = fetchFromGitHub {
    // ...
    tag = "v${finalAttrs.version}";
  // ...

Copy link
Author

Choose a reason for hiding this comment

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

Build commit is not required but build time is required to have a value in order not to break version subcommand.

Copy link
Contributor

@yzx9 yzx9 Oct 14, 2025

Choose a reason for hiding this comment

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

I'd recommend using simplified version and a fixed timestamp 1970-01-01T00:00:00Z for better maintainability.

For ref:

"-X=main.Version=${version}"
"-X=main.Commit=${src.rev}"
"-X=main.Build=1970-01-01T00:00:00+00:00"

"-X github.com/ivpn/desktop-app/daemon/version._version=${version}"
"-X github.com/ivpn/desktop-app/daemon/version._time=1970-01-01"

Copy link
Author

Choose a reason for hiding this comment

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

Agreed, I used SOURCE_DATE_EPOCH variable for the build time.

@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Oct 14, 2025
@yzx9
Copy link
Contributor

yzx9 commented Oct 14, 2025

And, please squash the commits to:

  • maintainers: add _0xzer0x
  • go-pray: init at 0.1.13

Comment on lines 26 to 28
alsa-lib
installShellFiles
];
Copy link
Member

@SuperSandro2000 SuperSandro2000 Oct 14, 2025

Choose a reason for hiding this comment

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

Suggested change
alsa-lib
installShellFiles
];
installShellFiles
];
buildInputs = [
alsa-lib
];

wait, alsa-lib is already in buildInputs below. Why do we need both? is there an alsa-config script or so?

also lets keep the inputs together

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for pointing this out, I removed it from the nativeBuildInputs but I require it as a runtime dependency so I will have to leave it in buildInputs.

Comment on lines 31 to 36
"-X github.com/0xzer0x/go-pray/internal/version.version=${finalAttrs.version}"
];

preBuild = ''
ldflags+=" -X github.com/0xzer0x/go-pray/internal/version.buildTime=$(date -u -d "@$SOURCE_DATE_EPOCH" "+%Y-%m-%dT%H:%M:%SZ")"
'';
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"-X github.com/0xzer0x/go-pray/internal/version.version=${finalAttrs.version}"
];
preBuild = ''
ldflags+=" -X github.com/0xzer0x/go-pray/internal/version.buildTime=$(date -u -d "@$SOURCE_DATE_EPOCH" "+%Y-%m-%dT%H:%M:%SZ")"
'';
"-X github.com/0xzer0x/go-pray/internal/version.version=${finalAttrs.version}"
"-X github.com/0xzer0x/go-pray/internal/version.buildTime=1980-01-01T00:00:00Z"
];

lets make this simple

Comment on lines 38 to 35
buildInputs = [ alsa-lib ];

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
buildInputs = [ alsa-lib ];

@0xzer0x 0xzer0x force-pushed the add-go-pray branch 2 times, most recently from 6101fc2 to 9ce2ce0 Compare October 14, 2025 13:54
go-pray: refactor to remove build commit and time workaround

This approach of keeping the required metadata in the actual package.nix
maintains reproducibility while keeping metadata required by upstream
package.

go-pray: remove manually added variables and use source date epoch for build time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 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. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants