Skip to content

Add NIS One-Click-Backup#287497

Merged
OPNA2608 merged 2 commits intoNixOS:masterfrom
dev-nis:master
Mar 3, 2024
Merged

Add NIS One-Click-Backup#287497
OPNA2608 merged 2 commits intoNixOS:masterfrom
dev-nis:master

Conversation

@dev-nis
Copy link
Contributor

@dev-nis dev-nis commented Feb 9, 2024

Description of changes

Add the new application "NIS One-Click-Backup" to nixpkgs. It is a simple program to backup folders to an external location by copying them. The source code can be found here

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.05 Release Notes (or backporting 23.05 and 23.11 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.

@NixOSInfra NixOSInfra added the 12.first-time contribution This PR is the author's first one; please be gentle! label Feb 9, 2024
Copy link
Contributor

@OPNA2608 OPNA2608 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. 👋

Please adjust your commits to the commit conventions (common and /pkgs-specific, employ squashing & rebasing), and check the suggestions.

@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 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. labels Feb 9, 2024
@ofborg ofborg bot added the 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. label Feb 12, 2024
Copy link
Contributor

@OPNA2608 OPNA2608 left a comment

Choose a reason for hiding this comment

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

Result of nixpkgs-review pr 287497 run on x86_64-linux 1

1 package built:
  • one-click-backup

image

Launches. Please see the suggestion I added, then squash as explained earlier. Expected order & format of commits is:

  • maintainers: add NIS
  • one-click-backup: init at 1.2.2.1

@dev-nis
Copy link
Contributor Author

dev-nis commented Feb 12, 2024

Squashing and rebasing is now done! I hope I have done everything correctly, this is my first time messing around with git rebase

@OPNA2608
Copy link
Contributor

Doesn't look squashed to me, should show 2 commits instead of 22.


Fails to build on Darwin:

FAILED: CMakeFiles/NIS_One-Click-Backup_Qt.dir/src/backupplan.cpp.o 
/nix/store/9zmsrxb7nbf3y7pz42968x4iw6536gil-clang-wrapper-16.0.6/bin/clang++ -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_QUICK_LIB -I/tmp/nix-build-one-click-backup-1.2.2.1.drv-0/source/build -I/tmp/nix-build-one-click-backup-1.2.2.1.drv-0/source -I/tmp/nix-build-one-click-backup-1.2.2.1.drv-0/source/build/NIS_One-Click-Backup_Qt_autogen/include -isystem /nix/store/mqlqg3la9hwby7asm1mpmq3ngg424pzn-qtdeclarative-6.6.1/lib/QtQml.framework/Headers -iframework /nix/store/mqlqg3la9hwby7asm1mpmq3ngg424pzn-qtdeclarative-6.6.1/lib -isystem /nix/store/6l7l284p6gmyx8kdn63gr5bbxkfhn8wz-qtbase-6.6.1/lib/QtCore.framework/Headers -iframework /nix/store/6l7l284p6gmyx8kdn63gr5bbxkfhn8wz-qtbase-6.6.1/lib -isystem /nix/store/6l7l284p6gmyx8kdn63gr5bbxkfhn8wz-qtbase-6.6.1/mkspecs/macx-clang -isystem /nix/store/mqlqg3la9hwby7asm1mpmq3ngg424pzn-qtdeclarative-6.6.1/include/QtQmlIntegration -isystem /nix/store/6l7l284p6gmyx8kdn63gr5bbxkfhn8wz-qtbase-6.6.1/lib/QtNetwork.framework/Headers -isystem /nix/store/mqlqg3la9hwby7asm1mpmq3ngg424pzn-qtdeclarative-6.6.1/lib/QtQuick.framework/Headers -isystem /nix/store/6l7l284p6gmyx8kdn63gr5bbxkfhn8wz-qtbase-6.6.1/lib/QtGui.framework/Headers -isystem /nix/store/mqlqg3la9hwby7asm1mpmq3ngg424pzn-qtdeclarative-6.6.1/lib/QtQmlModels.framework/Headers -isystem /nix/store/6l7l284p6gmyx8kdn63gr5bbxkfhn8wz-qtbase-6.6.1/lib/QtOpenGL.framework/Headers -O3 -DNDEBUG -fPIC -MD -MT CMakeFiles/NIS_One-Click-Backup_Qt.dir/src/backupplan.cpp.o -MF CMakeFiles/NIS_One-Click-Backup_Qt.dir/src/backupplan.cpp.o.d -o CMakeFiles/NIS_One-Click-Backup_Qt.dir/src/backupplan.cpp.o -c /tmp/nix-build-one-click-backup-1.2.2.1.drv-0/source/src/backupplan.cpp
/tmp/nix-build-one-click-backup-1.2.2.1.drv-0/source/src/backupplan.cpp:149:23: error: implicit instantiation of undefined template 'std::basic_stringstream<char>'
    std::stringstream ss(s);
                      ^
/nix/store/ymw82wxygwr9mia2qnh6a7pbw6jr2rjw-libcxx-16.0.6-dev/include/c++/v1/iosfwd:134:32: note: template is declared here
    class _LIBCPP_TEMPLATE_VIS basic_stringstream;
                               ^
1 error generated.

Maybe missing a #include <sstream>? Not sure. If you can get that fixed that'd be great, otherwise mark Darwin as broken please.

meta = with lib; {
  # <other attributes>
  # error: implicit instantiation of undefined template 'std::basic_stringstream<char>'
  broken = stdenv.hostPlatform.isDarwin;
};

@dev-nis
Copy link
Contributor Author

dev-nis commented Feb 13, 2024

If you can get that fixed that'd be great

If I change the code, is there some way for me to test if it builds on Darwin? If I can get it fixed, I will upload a new release, if not I will mark it as broken.

Doesn't look squashed to me, should show 2 commits instead of 22.

That I don't understand, I explicitely used "squash" everywhere when running git rebase -i. Maybe I missed something, I will look into that.

@OPNA2608
Copy link
Contributor

OPNA2608 commented Feb 13, 2024

If I change the code, is there some way for me to test if it builds on Darwin?

Push a commit and fetch it as a patch.

patches = [
  # Maybe fix build on Darwin
  # Remove when version > 1.2.2.1
  (fetchpatch {
    url = "https://gitlab.com/dev-nis/nis-one-click-backup-qt/-/commit/fbecc454871c79add00ff35d363b262d543cd2ed.patch";
    hash = "";
  })
];

(replace with the commit's rev, fill in hash based on the hash mismatch error)

Co-authored-by: Cosima Neidahl <opna2608@protonmail.com>
@dev-nis
Copy link
Contributor Author

dev-nis commented Feb 14, 2024

If I change the code, is there some way for me to test if it builds on Darwin?

Push a commit and fetch it as a patch.

patches = [
  # Maybe fix build on Darwin
  # Remove when version > 1.2.2.1
  (fetchpatch {
    url = "https://gitlab.com/dev-nis/nis-one-click-backup-qt/-/commit/fbecc454871c79add00ff35d363b262d543cd2ed.patch";
    hash = "";
  })
];

(replace with the commit's rev, fill in hash based on the hash mismatch error)

Hi, I can't really figure out how this works. I added your code to my .nix-file and changed it accordingly, but it complains error: undefined variable 'fetchpatch'. What do I need to change for this to work? I can't seem to find any documentation about this
grafik

@dev-nis
Copy link
Contributor Author

dev-nis commented Feb 15, 2024

If you say everything is fine, I will squash the remaining commits

@OPNA2608
Copy link
Contributor

qt6.qtbase is currently broken on Darwin, so can't test this: #288842 (comment)

@dev-nis
Copy link
Contributor Author

dev-nis commented Feb 15, 2024

qt6.qtbase is currently broken on Darwin, so can't test this: #288842 (comment)

Actually, the program seems to build fine without qtbase, so I pushed a new commit removing the dependency. Let's see if it builds on Darwin now

@OPNA2608
Copy link
Contributor

I would expect qtdeclarative to depend on qtbase, so I'm not sure if this really fixes the situation, but I guess there's no harm in removing it.

@dev-nis
Copy link
Contributor Author

dev-nis commented Feb 15, 2024

I would expect qtdeclarative to depend on qtbase, so I'm not sure if this really fixes the situation, but I guess there's no harm in removing it.

Well, seems like you were right:
> > -- Configuring incomplete, errors occurred! For full logs, run 'nix log /nix/store/p04f3nsmny20v3pbxxklaixjzdglqkk7-qtbase-6.6.2.drv'. error: 1 dependencies of derivation '/nix/store/y5lfmi3v3q0kp745d4bqmfq74qjfnksj-qttools-6.6.2.drv' failed to build error: 1 dependencies of derivation '/nix/store/8ay1bs25mlvwpsli5yrz3zadjhwzcq9k-qttranslations-6.6.2.drv' failed to build error: 1 dependencies of derivation '/nix/store/vlg6q8z96frv0kgk4538icqrhp3qn9kl-qtbase-6.6.2.drv' failed to build error: 1 dependencies of derivation '/nix/store/ajw3rn9jkd4irs1j4f31ihn2ny09zs6i-qtlanguageserver-6.6.2.drv' failed to build error: 1 dependencies of derivation '/nix/store/bbfraxbls9afv2k8nlsasxvxp4g7xvg7-qtshadertools-6.6.2.drv' failed to build error: 3 dependencies of derivation '/nix/store/cv8fy0ivd71wna8fjzp07insgzcw8sl2-qtdeclarative-6.6.2.drv' failed to build error: 1 dependencies of derivation '/nix/store/5npx9fymd4abddwq12wm64hsb5y53w0x-one-click-backup-1.2.2.1.drv' failed to build

Should I then just wait for this issue to get fixed? Or should I mark Darwin as broken for now?

@OPNA2608
Copy link
Contributor

Give it a day or so and it should (hopefully) work again, fix has been merged.

Copy link
Member

Choose a reason for hiding this comment

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

extra-cmake-modules goes to nativeBuildInputs in my experience

Copy link
Contributor

Choose a reason for hiding this comment

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

#245900 (comment)

KDE's extra-cmake-modules is usually placed into nativeBuildInputs. strictDeps says that's wrong

@dev-nis
Copy link
Contributor Author

dev-nis commented Feb 16, 2024

I would expect qtdeclarative to depend on qtbase, so I'm not sure if this really fixes the situation, but I guess there's no harm in removing it.

Well, seems like you were right:
> > -- Configuring incomplete, errors occurred! For full logs, run 'nix log /nix/store/p04f3nsmny20v3pbxxklaixjzdglqkk7-qtbase-6.6.2.drv'. error: 1 dependencies of derivation '/nix/store/y5lfmi3v3q0kp745d4bqmfq74qjfnksj-qttools-6.6.2.drv' failed to build error: 1 dependencies of derivation '/nix/store/8ay1bs25mlvwpsli5yrz3zadjhwzcq9k-qttranslations-6.6.2.drv' failed to build error: 1 dependencies of derivation '/nix/store/vlg6q8z96frv0kgk4538icqrhp3qn9kl-qtbase-6.6.2.drv' failed to build error: 1 dependencies of derivation '/nix/store/ajw3rn9jkd4irs1j4f31ihn2ny09zs6i-qtlanguageserver-6.6.2.drv' failed to build error: 1 dependencies of derivation '/nix/store/bbfraxbls9afv2k8nlsasxvxp4g7xvg7-qtshadertools-6.6.2.drv' failed to build error: 3 dependencies of derivation '/nix/store/cv8fy0ivd71wna8fjzp07insgzcw8sl2-qtdeclarative-6.6.2.drv' failed to build error: 1 dependencies of derivation '/nix/store/5npx9fymd4abddwq12wm64hsb5y53w0x-one-click-backup-1.2.2.1.drv' failed to build

Should I then just wait for this issue to get fixed? Or should I mark Darwin as broken for now?

Give it a day or so and it should (hopefully) work again, fix has been merged.

Okay! How can I trigger a rebuild after a few days?

@OPNA2608
Copy link
Contributor

@ofborg build one-click-backup one-click-backup.passthru.tests

@dev-nis
Copy link
Contributor Author

dev-nis commented Feb 18, 2024

Seems like it still doesn't build on Darwin. I will mark "Darwin" as broken as soon as I can.

@dev-nis
Copy link
Contributor Author

dev-nis commented Feb 20, 2024

All checks pass now, if you say everything is fine, I will squash the commits again.

Copy link
Contributor

@OPNA2608 OPNA2608 left a comment

Choose a reason for hiding this comment

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

Otherwise looks fine for squashing

Co-authored-by: Cosima Neidahl <opna2608@protonmail.com>
@dev-nis
Copy link
Contributor Author

dev-nis commented Feb 21, 2024

Squashed now!

Copy link
Contributor

@OPNA2608 OPNA2608 left a comment

Choose a reason for hiding this comment

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

Result of nixpkgs-review pr 287497 run on x86_64-linux 1

1 package built:
  • one-click-backup

GUI lauches, LGTM.

@OPNA2608 OPNA2608 added the 12.approvals: 1 This PR was reviewed and approved by one person. label Feb 24, 2024
@dev-nis
Copy link
Contributor Author

dev-nis commented Feb 28, 2024

Great, thank's for all your comments and help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 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. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 12.approvals: 1 This PR was reviewed and approved by one person. 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.

4 participants

Comments