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

kitsas: init at 2.3 #115270

Merged
merged 2 commits into from Apr 12, 2021
Merged

kitsas: init at 2.3 #115270

merged 2 commits into from Apr 12, 2021

Conversation

gspia
Copy link
Contributor

@gspia gspia commented Mar 6, 2021

kitsas: init at 2.3

Motivation for this change

This adds an accounting application called kitsas to the set of available applications. Kitsas is suitable for Finnish associations and small business.

This is my first packaged application and related pull request. (I have no exp on reviewing nixpkgs issues yet.)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@gspia gspia changed the title Add kitsas, an accounting application kitsas: init at 2.3 Mar 6, 2021
@r-rmcgibbo
Copy link

r-rmcgibbo commented Mar 6, 2021

Result of nixpkgs-review pr 115270 at 5cb46d27 run on aarch64-linux 1

1 package built:
4 suggestions:
  • warning: missing-phase-hooks

    configurePhase should probably contain runHook preConfigure and runHook postConfigure.

    Near pkgs/applications/office/kitsas/default.nix:20:3:

       |
    20 |   configurePhase = ''
       |   ^
    
  • warning: missing-phase-hooks

    installPhase should probably contain runHook preInstall and runHook postInstall.

    Near pkgs/applications/office/kitsas/default.nix:29:3:

       |
    29 |   installPhase = ''
       |   ^
    
  • warning: unclear-gpl

    gpl3 is a deprecated license, check if project uses gpl3Plus or gpl3Only and change meta.license accordingly.

    Near pkgs/applications/office/kitsas/default.nix:43:5:

       |
    43 |     license = lib.licenses.gpl3;
       |     ^
    
  • warning: unused-argument

    Unused argument: qtcreator.
    Near pkgs/applications/office/kitsas/default.nix:1:53:

      |
    1 | { lib, mkDerivation, fetchFromGitHub, qmake, qtsvg, qtcreator, libsForQt5, libzip, pkg-config  }:
      |                                                     ^
    

Result of nixpkgs-review pr 115270 at 5cb46d27 run on x86_64-linux 1

1 package built:
4 suggestions:
  • warning: missing-phase-hooks

    configurePhase should probably contain runHook preConfigure and runHook postConfigure.

    Near pkgs/applications/office/kitsas/default.nix:20:3:

       |
    20 |   configurePhase = ''
       |   ^
    
  • warning: missing-phase-hooks

    installPhase should probably contain runHook preInstall and runHook postInstall.

    Near pkgs/applications/office/kitsas/default.nix:29:3:

       |
    29 |   installPhase = ''
       |   ^
    
  • warning: unclear-gpl

    gpl3 is a deprecated license, check if project uses gpl3Plus or gpl3Only and change meta.license accordingly.

    Near pkgs/applications/office/kitsas/default.nix:43:5:

       |
    43 |     license = lib.licenses.gpl3;
       |     ^
    
  • warning: unused-argument

    Unused argument: qtcreator.
    Near pkgs/applications/office/kitsas/default.nix:1:53:

      |
    1 | { lib, mkDerivation, fetchFromGitHub, qmake, qtsvg, qtcreator, libsForQt5, libzip, pkg-config  }:
      |                                                     ^
    

pkgs/applications/office/kitsas/default.nix Outdated Show resolved Hide resolved
pkgs/applications/office/kitsas/default.nix Outdated Show resolved Hide resolved
pkgs/applications/office/kitsas/default.nix Outdated Show resolved Hide resolved
pkgs/applications/office/kitsas/default.nix Outdated Show resolved Hide resolved
pkgs/applications/office/kitsas/default.nix Outdated Show resolved Hide resolved
pkgs/applications/office/kitsas/default.nix Outdated Show resolved Hide resolved
pkgs/applications/office/kitsas/default.nix Outdated Show resolved Hide resolved
pkgs/applications/office/kitsas/default.nix Outdated Show resolved Hide resolved
pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
pkgs/applications/office/kitsas/default.nix Outdated Show resolved Hide resolved
@gspia
Copy link
Contributor Author

gspia commented Mar 9, 2021

Hopefully the commits do what you asked @SuperSandro2000 . Could you please re-review the changes?

pkgs/applications/office/kitsas/default.nix Outdated Show resolved Hide resolved
pkgs/applications/office/kitsas/default.nix Outdated Show resolved Hide resolved
pkgs/applications/office/kitsas/default.nix Outdated Show resolved Hide resolved
@gspia
Copy link
Contributor Author

gspia commented Mar 10, 2021

Thanks for the snd round @SuperSandro2000 ! How this MR looks now?

While implementing the changes, I started to wonder if there is a tool available to check the style. And possibly some of the facts like the one that using qmake means enabling parallel building. E.g. something like hlint that is used in Haskell. (I'll probably start a thread at nixos discourse as if there are tools, I think other people would benefit knowing about those - I tried to search for some but didn't find anything yet.)

Late addition:

It turned out that there are several suitable tools. I'll start trying them out.

@rmcgibbo
Copy link
Contributor

There are a few formatters (I use nixpkgs-format), and there's also nixpkgs-hammering to give hints. Can you squash the commits down into 2? It should be two commits like "maintainers: add {name}", and then "kitsas: init at 2.3".

@gspia gspia force-pushed the kitsas branch 2 times, most recently from 2bd11d3 to 86131b5 Compare March 17, 2021 05:07
@gspia
Copy link
Contributor Author

gspia commented Mar 17, 2021

Haa and thanks!
I hope this has now better shape and sorry for not realizing right in the beginning to squash also the review changes into two commits and using the correctly formatted commit titles.
Thus, could you please check once more @rmcgibbo and/or @SuperSandro2000 that everything is ok?

@gspia gspia force-pushed the kitsas branch 2 times, most recently from 7ea5b7c to 1edf913 Compare March 22, 2021 05:12
@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/497

mkdir -p $out/bin $out/share
cp kitsas $out/bin
cp $src/kitsas.png $out/share
cp $src/kitsas.desktop $out/share
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
cp $src/kitsas.desktop $out/share
cp $src/kitsas.desktop $out/share/applications

Copy link
Contributor Author

@gspia gspia Apr 10, 2021

Choose a reason for hiding this comment

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

Thanks, I made this change and tried two formatters on this default.nix file and included the changes (the qmakeFlags on separate lines). Further, I found a typo on the description (the associations word).

To be sure that there is that applications directory, I added it into the mkdir command above.

I didn't realize at all that the applications directory was needed (the icons were "working" in my case when I tried this locally). (I also tried to try the hammering but wasn't yet able to see, how to use it.)

installPhase = ''
mkdir -p $out/bin $out/share
cp kitsas $out/bin
cp $src/kitsas.png $out/share
Copy link
Member

Choose a reason for hiding this comment

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

This probably needs adjustment, too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I copied this too into the applications directory.

Add kitsas, an accounting application

This commit adds an accounting application called kitsas to the
set of packages. Kitsas is suitable for Finnish associations and
small business.

Change meta maintainers

Change the meta license line

Add newlines

Change the top level caller

Start using qmakeFlags

Second review round changes

Change license to non-deprecated one

Typo in the license constant
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.

None yet

5 participants