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

gokapi: init at 1.9.6 #372911

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

gokapi: init at 1.9.6 #372911

wants to merge 2 commits into from

Conversation

delliottxyz
Copy link
Contributor

@delliottxyz delliottxyz commented Jan 11, 2025

Add gokapi, a convenient service for generating links to file downloads.

Adds package derivation, module, and tests.

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

@delliottxyz delliottxyz marked this pull request as draft January 11, 2025 12:02
@delliottxyz delliottxyz changed the title init: gokapi at 1.9.6 gokapi: init at 1.9.6 Jan 11, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation This PR adds or changes documentation 8.has: changelog 8.has: module (update) This PR changes an existing module in `nixos/` labels Jan 11, 2025
@delliottxyz delliottxyz marked this pull request as ready for review January 11, 2025 12:50
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/5071

pkgs/by-name/go/gokapi/package.nix Outdated Show resolved Hide resolved
pkgs/by-name/go/gokapi/package.nix Show resolved Hide resolved
pkgs/by-name/go/gokapi/package.nix Show resolved Hide resolved
nixos/modules/services/networking/gokapi.nix Outdated Show resolved Hide resolved
nixos/modules/services/networking/gokapi.nix Outdated Show resolved Hide resolved
@delliottxyz
Copy link
Contributor Author

delliottxyz commented Jan 11, 2025

Thank you for the review. All of your suggestions taken and implemented, did so locally to keep the commit history to two clean commits.

@ethancedwards8
Copy link
Member

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 372911


aarch64-darwin

❌ 1 package failed to build:
  • gokapi

@ethancedwards8
Copy link
Member

       > Running phase: configurePhase
       > Running phase: buildPhase
       > Updated version template
       > Updated minify go file
       > Compiled Downloader WASM module
       > Compiled E2E WASM module
       > Copied wasm_exec.js
       > Copied go.mod
       > Copied openapi.json
       > Building subPackage ./cmd/gokapi
       > Running phase: checkPhase
       > ?    github.com/forceu/gokapi/cmd/gokapi     [no test files]
       > Running phase: installPhase
       > Running phase: fixupPhase
       > checking for references to /private/tmp/nix-build-gokapi-1.9.6.drv-0/ in /nix/store/jgr5x5kbmw68jw3fvy1w7nirly37cxq0-gokapi-1.9.6...
       > patching script interpreter paths in /nix/store/jgr5x5kbmw68jw3fvy1w7nirly37cxq0-gokapi-1.9.6
       > stripping (with command strip and flags -S) in  /nix/store/jgr5x5kbmw68jw3fvy1w7nirly37cxq0-gokapi-1.9.6/bin
       > Running phase: installCheckPhase
       > Executing versionCheckPhase
       > Did not find version 1.9.6 in the output of the command /nix/store/jgr5x5kbmw68jw3fvy1w7nirly37cxq0-gokapi-1.9.6/bin/gokapi --version
       > panic: open /etc/protocols: operation not permitted
       >
       > goroutine 1 [running]:
       > modernc.org/libc/honnef.co/go/netdb.init.0()
       >   modernc.org/[email protected]/honnef.co/go/netdb/netdb.go

@delliottxyz
Copy link
Contributor Author

delliottxyz commented Jan 11, 2025

Oh, good job on catching that, thank you.

The output of -- version is quite lengthy, and I don't know how complex of an output the check version hook can handle. Might be best to just remove that hook?

Or perhaps mark it as only available for linux?

@ethancedwards8
Copy link
Member

Or perhaps mark it as only available for linux?

That may be best. I'm not sure.

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin and removed 10.rebuild-darwin: 1-10 labels Jan 11, 2025
@delliottxyz
Copy link
Contributor Author

I have now specified lib.platforms.linux.

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 372911


x86_64-linux

✅ 1 package built:
  • gokapi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation This PR adds or changes documentation 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants