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

odafileconverter: init at 21.7.0.0 #95392

Merged
merged 1 commit into from Aug 28, 2020
Merged

odafileconverter: init at 21.7.0.0 #95392

merged 1 commit into from Aug 28, 2020

Conversation

nagisa
Copy link
Contributor

@nagisa nagisa commented Aug 14, 2020

Motivation for this change

This is the way to convert AutoCAD DWG files to something more open on Linux. It can work both as a stand-alone tool as well as used transparently by freecad and similar tooling to enable DWG support in them.

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.

Copy link
Contributor

@ymarkus ymarkus left a comment

Choose a reason for hiding this comment

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

Reviewed points
  • package path fits guidelines
  • package name fits guidelines
  • package version fits guidelines
  • package build on x86_64-linux
  • executables tested on x86_64-linux
  • meta.description is set and fits guidelines
  • meta.license fits upstream license
  • meta.platforms is set
  • meta.maintainers is set
  • build time only dependencies are declared in nativeBuildInputs
  • source is fetched using the appropriate function
  • phases are respected
Possible improvements

Please see my comments

Comments

I'm not sure if the package name odafileconverter might be more accurate, but I think this name is fine.

pkgs/applications/graphics/odaconverter/default.nix Outdated Show resolved Hide resolved
pkgs/applications/graphics/odaconverter/default.nix Outdated Show resolved Hide resolved
pkgs/applications/graphics/odaconverter/default.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@ymarkus ymarkus left a comment

Choose a reason for hiding this comment

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

Forgot the name attribute in my last review. Please see my comment.

Comment on lines 7 to 9
in mkDerivation {
pname = "oda-converter";
inherit version;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a name attribute, such as:

name = "${pname}-${version}";

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is it necessary? I thought pname + version was all you needed?

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like you're right, sorry. This section of the nixpkg manual made it seem like it is required, but it isn't.

@nagisa nagisa changed the title odaconverter: init at 21.7.0.0 odafileconverter: init at 21.7.0.0 Aug 14, 2020
Copy link
Contributor

@ymarkus ymarkus left a comment

Choose a reason for hiding this comment

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

All good now from my side. Built & tested on x86_64-linux.

Reviewed points
  • package path fits guidelines
  • package name fits guidelines
  • package version fits guidelines
  • package build on x86_64-linux
  • executables tested on x86_64-linux
  • meta.description is set and fits guidelines
  • meta.license fits upstream license
  • meta.platforms is set
  • meta.maintainers is set
  • build time only dependencies are declared in nativeBuildInputs
  • source is fetched using the appropriate function
  • phases are respected

Copy link
Member

@Ekleog Ekleog left a comment

Choose a reason for hiding this comment

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

LGTM! I think this is ready to merge once the comment about where the version number comes from is added, though it'd be best if you could also have a look at the other comments

pkgs/applications/graphics/odafileconverter/default.nix Outdated Show resolved Hide resolved
{ lib, stdenv, mkDerivation, dpkg, fetchurl, qtbase }:

let
version = "21.7.0.0";
Copy link
Member

Choose a reason for hiding this comment

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

I've been able to find the download link at https://www.opendesign.com/guestfiles/oda_file_converter ; but could you add a comment stating where you found the version number? I can find it nowhere in the page

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They are pretty bad at software distribution honestly speaking. Not only do they not publish the version number (gotta dig for it in the deb metadata) but they also do not maintain stable URI for the past releases.

wrapQtApp $out/libexec/ODAFileConverter
mv $out/libexec/ODAFileConverter $out/bin

find $out/libexec -type f | while read file; do
Copy link
Member

Choose a reason for hiding this comment

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

Maybe consider adding -executable, to be more resilient towards future changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@Ekleog
Copy link
Member

Ekleog commented Aug 28, 2020

Cool, thank you!

@Ekleog Ekleog merged commit a8bd5c1 into NixOS:master Aug 28, 2020
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

3 participants