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

ldtk: init at 1.1.3 #178896

Merged
merged 1 commit into from
Jun 26, 2022
Merged

ldtk: init at 1.1.3 #178896

merged 1 commit into from
Jun 26, 2022

Conversation

felschr
Copy link
Member

@felschr felschr commented Jun 24, 2022

Description of changes

Adds LDtk: A modern 2D level editor from the creator of Dead Cells, with a strong focus on user-friendliness.
Closes #168277

The AppImage is distributed within a zip file and I haven't found a way to use that with appimageTools.wrapType2, thus I'm using a wrapper which runs appimage-run instead.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 22.11 Release Notes (or backporting 22.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
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@felschr felschr added the needs_reviewer (old Marvin label, do not use) label Jun 24, 2022
@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: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 labels Jun 24, 2022
@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/944

@felschr felschr force-pushed the ldtk branch 2 times, most recently from 833fbb1 to d8877db Compare June 24, 2022 23:13
Copy link
Member

@azahi azahi left a comment

Choose a reason for hiding this comment

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

Builds and runs fine for me.


nativeBuildInputs = [ unzip ];

buildInputs = [ appimage-run ];
Copy link
Member

@azahi azahi Jun 24, 2022

Choose a reason for hiding this comment

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

Why use a pre-built AppImage at all? Wouldn't it be better to compile the package from the source?

Copy link
Member

Choose a reason for hiding this comment

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

There is no a priori prohibition to precompiled packages in NixOS.
Also, it is not always easy to build a package from sources - look at the guy trying to compile KoReader:

#178557

I would only suggest to rename it to ldtk-appimage in order to differentiate future source-based build expressions.

Copy link
Member

@SuperSandro2000 SuperSandro2000 Jun 25, 2022

Choose a reason for hiding this comment

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

There is no a priori prohibition to precompiled packages in NixOS.

We always prefer building from source if it is easily possible.

I would only suggest to rename it to ldtk-appimage in order to differentiate future source-based build expressions.

No, we should set meta data to reflect that it isn't build from source.

Copy link
Member

Choose a reason for hiding this comment

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

We always prefer building from source if it is easily possible.

Nonetheless it is not a veto or avoidance of precompiled based packaging "at all costs".

No, we should set meta data to reflect that it isn't build from source.

Sometimes both source-based and precompiled packages are used in Nixpkgs. Obviously they can't have the same exact name in all-packages.nix.

Copy link
Member

@SuperSandro2000 SuperSandro2000 Jun 25, 2022

Choose a reason for hiding this comment

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

Nonetheless it is not a veto or avoidance of precompiled based packaging "at all costs".

If the package is using a standard build system (make, autotools, cmake, etc), has good nixpkgs support (eg not maven, gradle, javascript) and is not proprietary, then fetching a precompiled binary is not acceptable. Some packages are really cumbersome to build where we can make exceptions on a case by case basis.

Sometimes both source-based and precompiled packages are used in Nixpkgs. Obviously they can't have the same exact name in all-packages.nix.

Yes but that is not the case here. All packages that only have one variant don't get a suffix. Also we should only maintain two versions if the compiled version has major drawbacks.

Copy link
Member

Choose a reason for hiding this comment

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

#178557

I think we can make an exception there because building from source is not easy and upstream has seemingly no good support for linking against system libraries. Going the proposed way there leaves us with a lot of code to maintain which is not worth it.

Copy link
Member

Choose a reason for hiding this comment

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

If the package is using a standard build system (make, autotools, cmake, etc), has good nixpkgs support (eg not maven, gradle, javascript) and is not proprietary, then fetching a precompiled binary is not acceptable. Some packages are really cumbersome to build where we can make exceptions on a case by case basis.

That being said, it requires Haxe, Electron and NPM. Hard but doable.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd rather have this built from source, too. I don't think I can accomplish it with my current abilities & time, though.


nativeBuildInputs = [ unzip ];

buildInputs = [ appimage-run ];
Copy link
Member

Choose a reason for hiding this comment

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

There is no a priori prohibition to precompiled packages in NixOS.
Also, it is not always easy to build a package from sources - look at the guy trying to compile KoReader:

#178557

I would only suggest to rename it to ldtk-appimage in order to differentiate future source-based build expressions.

Copy link
Member

@dotlambda dotlambda left a comment

Choose a reason for hiding this comment

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

meta.sourceProvenance is missing

@felschr felschr requested a review from dotlambda June 26, 2022 13:40
@SuperSandro2000 SuperSandro2000 merged commit 148a3d9 into NixOS:master Jun 26, 2022
@Ashe
Copy link

Ashe commented Jun 26, 2022

Thank you for this! :)

@github-actions
Copy link
Contributor

Successfully created backport PR #179591 for release-22.05.

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: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes needs_reviewer (old Marvin label, do not use)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LDtk - 2D level editor
7 participants