Skip to content

Conversation

terrorbyte
Copy link
Member

Adds the foks federated key management and distribution system server.

This is the server component of #424406

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 others READMEs.

Add a 👍 reaction to pull requests you find important.

@terrorbyte terrorbyte force-pushed the pkgs/terrorbyte/foks-server branch from 76e7580 to 3a5f7cf Compare July 18, 2025 16:18
@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: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. labels Jul 18, 2025
@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jul 21, 2025
@liberodark
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 426432

Logs: https://github.com/liberodark/nixpkgs-review-gha/actions/runs/16419670555


x86_64-linux

✅ 1 package built:
  • foks-server

aarch64-linux

✅ 1 package built:
  • foks-server

x86_64-darwin (sandbox = true)

❌ 1 package failed to build:
  • foks-server

aarch64-darwin (sandbox = true)

✅ 1 package built:
  • foks-server

@terrorbyte
Copy link
Member Author

x86_64-darwin (sandbox = true)

❌ 1 package failed to build:

Interesting, looks like tailwindcss is segfaulting on x86_64 darwin: https://github.com/liberodark/nixpkgs-review-gha/actions/runs/16419670555/job/46394482490#step:6:389

@terrorbyte terrorbyte force-pushed the pkgs/terrorbyte/foks-server branch from 3a5f7cf to c75a72f Compare July 21, 2025 23:08
@terrorbyte
Copy link
Member Author

Fixed review comments and migrated to finalAttrs

@Skyb0rg007
Copy link
Contributor

Any updates on this? It looks like the darwin-x86_64 test is still running.

@Iamanaws Iamanaws mentioned this pull request Aug 23, 2025
13 tasks
@liberodark
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 426432
Commit: c75a72f3e42a52d280d13f6ec9a123e1128441e7 (subsequent changes)
Merge: 01dc49a076b6570590f683ac522eb02084b897a9

Logs: https://github.com/liberodark/nixpkgs-review-gha/actions/runs/17265211525


x86_64-linux

✅ 1 package built:
  • foks-server

aarch64-linux

✅ 1 package built:
  • foks-server

x86_64-darwin (sandbox = true)

✅ 1 package built:
  • foks-server

aarch64-darwin (sandbox = true)

✅ 1 package built:
  • foks-server

@terrorbyte
Copy link
Member Author

For the maintainers here, quick etiquette question, since this push and review foks has pushed a 1.2. Is it better for me to just bump those changes now in this PR or wait for merge and then open a new PR to bump the version?

@GaetanLepage
Copy link
Contributor

For the maintainers here, quick etiquette question, since this push and review foks has pushed a 1.2. Is it better for me to just bump those changes now in this PR or wait for merge and then open a new PR to bump the version?

It's fine to update (force-push) the PR to directly package the latest version.

Adds the foks federated key management and distribution system server.
@terrorbyte terrorbyte force-pushed the pkgs/terrorbyte/foks-server branch from c75a72f to c5a9109 Compare August 29, 2025 23:30
@terrorbyte terrorbyte changed the title foks-server: init at 0.1.1 foks-server: init at 0.1.2 Aug 29, 2025
@GaetanLepage
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review-gha

Command: nixpkgs-review pr 426432

Logs: https://github.com/GaetanLepage/nixpkgs-review-gha/actions/runs/17358212851


x86_64-linux

✅ 1 package built:
  • foks-server

aarch64-linux

✅ 1 package built:
  • foks-server

x86_64-darwin (sandbox = true)

✅ 1 package built:
  • foks-server

aarch64-darwin (sandbox = true)

✅ 1 package built:
  • foks-server

Comment on lines +48 to +66
postPatch = ''
# Generate templates
cd ./server/web/templates
${templFoks}/bin/templ generate
cd -
# Generate tailwind
cd ./server/web/frontend
mkdir -p ../static/css
${tailwindcss_4}/bin/tailwindcss -i ./css/input.css -o ../static/css/style.min.css --minify
${tailwindcss_4}/bin/tailwindcss -i ./css/input.css -o ../static/css/style.css
${uglify-js}/bin/uglifyjs -c < ../static/js/foks.js > ../static/js/foks.min.js
cd -
# Copy htmx dependency from node modules
cd ./server/web/static
mkdir -p ./js
cp ${foksNodeModules}/node_modules/htmx.org/dist/htmx.js ./js/htmx.js
cp ${foksNodeModules}/node_modules/htmx.org/dist/htmx.min.js ./js/htmx.min.js
cd -
'';
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
postPatch = ''
# Generate templates
cd ./server/web/templates
${templFoks}/bin/templ generate
cd -
# Generate tailwind
cd ./server/web/frontend
mkdir -p ../static/css
${tailwindcss_4}/bin/tailwindcss -i ./css/input.css -o ../static/css/style.min.css --minify
${tailwindcss_4}/bin/tailwindcss -i ./css/input.css -o ../static/css/style.css
${uglify-js}/bin/uglifyjs -c < ../static/js/foks.js > ../static/js/foks.min.js
cd -
# Copy htmx dependency from node modules
cd ./server/web/static
mkdir -p ./js
cp ${foksNodeModules}/node_modules/htmx.org/dist/htmx.js ./js/htmx.js
cp ${foksNodeModules}/node_modules/htmx.org/dist/htmx.min.js ./js/htmx.min.js
cd -
'';
postPatch =
# Generate templates
''
pushd ./server/web/templates
${templFoks}/bin/templ generate
popd
''
# Generate tailwind
+ ''
pushd ./server/web/frontend
mkdir -p ../static/css
${lib.getExe tailwindcss_4} -i ./css/input.css -o ../static/css/style.min.css --minify
${lib.getExe tailwindcss_4} -i ./css/input.css -o ../static/css/style.css
${lib.getExe uglify-js} -c < ../static/js/foks.js > ../static/js/foks.min.js
popd
''
# Copy htmx dependency from node modules
+ ''
pushd ./server/web/static
mkdir -p ./js
cp ${foksNodeModules}/node_modules/htmx.org/dist/htmx.js ./js/htmx.js
cp ${foksNodeModules}/node_modules/htmx.org/dist/htmx.min.js ./js/htmx.min.js
popd
'';

Nits (non-blocking).
lib.getExe is preferred from hardcoding /bin/foo. Also, prefer leaving comments outside of nix strings, so that they can be changed without triggering any rebuild.

ldflags = [
"-X main.LinkerVersion=v${finalAttrs.version}"
];

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "version";
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Aug 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package 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.approvals: 1 This PR was reviewed and approved by one person.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants