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

froide: init at 0-unstable-2024-11-22; nixos/froide: init #355835

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

Conversation

onny
Copy link
Contributor

@onny onny commented Nov 14, 2024

Adding web app froide, a portal for creating and following freedom of information act requests. Used by FragDenStaat project

Depends on:

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.

@github-actions github-actions bot added 6.topic: python 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: documentation 8.has: changelog 8.has: module (update) This PR changes an existing module in `nixos/` labels Nov 14, 2024
Copy link
Contributor

@pluiedev pluiedev left a comment

Choose a reason for hiding this comment

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

Maybe it would be better to clarify which country/region this app is for? Also please run nixfmt on your changes (except for large files like all-packages.nix, python-modules.nix, etc), and reorder commits so that froide's dependencies are added before froide itself

in {
options.services.froide = {

enable = lib.mkEnableOption "Gouvernment planer web app Govplan";
Copy link
Contributor

Choose a reason for hiding this comment

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

User-facing documentation should be (unfortunately) in English

froide = {
description = "Gouvernment planer Govplan";
serviceConfig = {
ExecStart = "${pkgs.froide}/bin/froide runserver 0.0.0.0:8000";
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding host & port options

EnvironmentFile = [
( format.generate "froide-env" cfg.settings )
cfg.secrets
];
Copy link
Contributor

Choose a reason for hiding this comment

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

Optional: hardening?

@@ -0,0 +1,90 @@
import ./make-test-python.nix ({ lib, ... }: {
name = "paperless";
Copy link
Contributor

Choose a reason for hiding this comment

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

This is still paperless

postInstall = ''
cp manage.py $out/
makeWrapper $out/manage.py $out/bin/froide \
--prefix PYTHONPATH : "$PYTHONPATH" \
Copy link
Contributor

Choose a reason for hiding this comment

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

This should already happen when patching interpreters in fixupPhase

pkgs/by-name/fr/froide/package.nix Outdated Show resolved Hide resolved
description = "Freedom of Information Portal";
homepage = "https://github.com/okfde/froide";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.onny ];
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing mainProgram, and platforms if applicable

dependencies = [ django ];

checkPhase = ''
${python.interpreter} manage.py test
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't python3 already be in PATH? Plus, python means Python 2 (!)

@h7x4 h7x4 added 8.has: module (new) This PR adds a module in `nixos/` 8.has: tests This PR has tests labels Nov 15, 2024
@onny onny force-pushed the froide branch 2 times, most recently from 770a98b to c63c317 Compare November 15, 2024 17:53
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 labels Nov 16, 2024
@onny onny changed the title froide: init at 0-unstable-2024-07-15; nixos/froide: init froide: init at 0-unstable-2024-11-22; nixos/froide: init Nov 24, 2024
@onny onny force-pushed the froide branch 2 times, most recently from 955daac to f18d580 Compare November 24, 2024 10:44
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 6.topic: python 8.has: changelog 8.has: documentation 8.has: module (new) This PR adds a module in `nixos/` 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 8.has: tests This PR has tests 10.rebuild-darwin: 1-10 10.rebuild-linux: 1-10 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants