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
Conversation
There was a problem hiding this 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.
There was a problem hiding this 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.
in mkDerivation { | ||
pname = "oda-converter"; | ||
inherit version; |
There was a problem hiding this comment.
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}";
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this 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
There was a problem hiding this 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
{ lib, stdenv, mkDerivation, dpkg, fetchurl, qtbase }: | ||
|
||
let | ||
version = "21.7.0.0"; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Cool, thank you! |
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
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)