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

Freeplane: init at 1.6.13 #34752

Closed
wants to merge 1 commit into from
Closed

Freeplane: init at 1.6.13 #34752

wants to merge 1 commit into from

Conversation

freeman42x
Copy link
Contributor

Packaged Freeplane based on the expression from Freemind. Freeplane is a project based on Freemind but made to be better in some ways.

  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

cp -r BIN $out/nix-support
sed -i 's/which/type -p/' $out/nix-support/BIN/freeplane.sh

cat >$out/bin/freeplane <<EOF
Copy link
Member

Choose a reason for hiding this comment

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

consider using makeWrapper here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Mic92 I found https://nixos.org/nixpkgs/manual/#ssec-stdenv-functions but I do not understand how to use it in this case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@puffnfresh explained to me how it works. I'll update as soon as Freeplane .desktop PR is done.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Mic92 Updated to use makeWrapper and also to use .desktop file

@Mic92
Copy link
Member

Mic92 commented Feb 9, 2018

@GrahamcOfBorg build freeplane

@GrahamcOfBorg
Copy link

Failure on x86_64-darwin (full log)

Partial log (click to expand)

Package ‘freeplane-1.6.13’ in /private/var/lib/ofborg/checkout/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/lnl7-mac/pkgs/applications/misc/freeplane/default.nix:36 is not supported on ‘x86_64-darwin’, refusing to evaluate.

a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowBroken = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowBroken = true; }
to ~/.config/nixpkgs/config.nix.

@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Partial log (click to expand)

error: while evaluating the attribute 'buildInputs' of the derivation 'freeplane-1.6.13' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/stdenv/generic/make-derivation.nix:148:11:
while evaluating the attribute 'buildInputs' of the derivation 'openjdk-8u172b02' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/stdenv/generic/make-derivation.nix:148:11:
while evaluating the attribute 'buildCommand' of the derivation 'openjdk-bootstrap' at /var/lib/gc-of-borg/nix-test-rs-2/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-2/pkgs/stdenv/generic/make-derivation.nix:148:11:
No bootstrap for system

@GrahamcOfBorg
Copy link

Failure on x86_64-linux (full log)

Partial log (click to expand)

    Gradle Central Plugin Repository

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 4s
builder for ‘/nix/store/5vi8h9qa75by8gdxp11b0rp573zjgaif-freeplane-1.6.13.drv’ failed with exit code 1
error: build of ‘/nix/store/5vi8h9qa75by8gdxp11b0rp573zjgaif-freeplane-1.6.13.drv’ failed

@Mic92
Copy link
Member

Mic92 commented Feb 9, 2018

The error you see here, is related to the fact, that gradle tries to download something.
Network access is not allowed in nix sandboxes are enabled because of reproducible builds.

@Mic92
Copy link
Member

Mic92 commented Feb 9, 2018

I think the common solution for most java-based projects is to use jar files provided by upstream.
We do not have good nix tooling for java projects.

@freeman42x
Copy link
Contributor Author

@Mic92 Can this be merged or what else is required?

@joachifm
Copy link
Contributor

@razvan-panda I expect gradle dist still requires network access during the build? If so, you must find a way to make the dependencies dist acquires explicit. Usually there's some form of tooling that parses dependency information and dumps corresponding Nix expressions; per @Mic92's comment I suppose you'll need to do this by hand somehow.

I seem to recall that @NeQuissimus has done some work with gradle in the past, they might know more.

@freeman42x
Copy link
Contributor Author

@joachifm Thank you for feedback. I'll try to use https://github.com/mcpkg/gradle2nix and see if it still works.

@freeman42x
Copy link
Contributor Author

gradle2nix does not currently build and it is abandoned: mcpkg/gradle2nix#1

@freeman42x
Copy link
Contributor Author

I got it working but is seem so be more like pom2nix instead of gradle2nix: https://github.com/razvan-panda/gradle2nix

@puffnfresh
Copy link
Contributor

Still working on this @razvan-panda ?

@freeman42x
Copy link
Contributor Author

@puffnfresh Not working on it anymore since I could not find any way to solve it. I asked around quite a bit but no one knew how to do this either.

@aanderse
Copy link
Member

@razvan-panda the state of java in nixpkgs is rather unfortunate but if you intend to continue with this PR your best bet is to use the -bin release that upstream provides so you don't need to compile any jar files.

That being said... any motivation to continue with this PR?

@freeman42x
Copy link
Contributor Author

@aanderse I've abandoned this PR since it is low on my priority list.

@aanderse
Copy link
Member

@razvan-panda thanks for the update. Maybe someone will pick this up at some point in the future... 🤷‍♂️

@aanderse aanderse closed this May 22, 2019
@charles-dyfis-net charles-dyfis-net mentioned this pull request Jan 1, 2021
10 tasks
maxhbr added a commit to maxhbr/nixpkgs that referenced this pull request Feb 22, 2021
Freeplane is the more advanced and more actively developed successor of [freemind](https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/misc/freemind/default.nix).

- based on: NixOS#34752
- Development take place at  https://github.com/freeplane/freeplane

Signed-off-by: Maximilian Huber <gh@maxhbr.de>
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

8 participants