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

deepin.dde-network-utils: init at 0.1.2 #59038

Merged
merged 1 commit into from Apr 8, 2019
Merged

deepin.dde-network-utils: init at 0.1.2 #59038

merged 1 commit into from Apr 8, 2019

Conversation

romildo
Copy link
Contributor

@romildo romildo commented Apr 5, 2019

Motivation for this change

Add dde-network-utils to nixpkgs.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option 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 nix-review --run "nix-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@romildo
Copy link
Contributor Author

romildo commented Apr 5, 2019

The installed configuration file for pkg-config:

prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
exec_prefix=${prefix}
libdir=/nix/store/2j7jvx5qw9m7gmvpykp7vy3szlspsxnj-dde-network-utils-0.1.2/lib
includedir=/nix/store/2j7jvx5qw9m7gmvpykp7vy3szlspsxnj-dde-network-utils-0.1.2/include/libddenetworkutils


Name: libddenetworkutils
Description: libddenetworkutils
Version: 1.0.0
Libs: -L${libdir} -ldde-network-utils 
Cflags: -I${includedir}

I am not sure whether the first line can stay as it is.

@worldofpeace
Copy link
Contributor

Do we want to call the package dde-network-utils or deepin-network-utils?

Noticed that there's this inconsistency across distros, where it's called deepin-network-utils more frequently.

@romildo
Copy link
Contributor Author

romildo commented Apr 5, 2019

Do we want to call the package dde-network-utils or deepin-network-utils?

Noticed that there's this inconsistency across distros, where it's called deepin-network-utils more frequently.

I prefer keeping the original name. And it is already in the deepin meta package.

@romildo
Copy link
Contributor Author

romildo commented Apr 5, 2019

Look at this line at the source code: https://github.com/linuxdeepin/dde-network-utils/blob/master/networkworker.cpp#L83:

    const bool isAppProxyVaild = QProcess::execute("which", QStringList() << "/usr/bin/proxychains4") == 0;

Is it ok to keep the program which as it is, without a path? It should be found in the $PATH, because which is in buildInputs.

@worldofpeace
Copy link
Contributor

I'm thinking it would be a good idea, for this package specifically, to use a patch with substituteAll.

And only because there's those two to hardcode.

@worldofpeace
Copy link
Contributor

@romildo
Copy link
Contributor Author

romildo commented Apr 6, 2019

Patching with substituteAll seems more robust anyway.

@romildo
Copy link
Contributor Author

romildo commented Apr 6, 2019

The installed configuration file for pkg-config:

prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
[...]

I am not sure whether the first line can stay as it is.

Other packages have a *.pc file with qtbase in the prefix as well:

$ find /nix/store/*/lib/pkgconfig -name "*.pc" | xargs grep --color "prefix.*=.*qtbase"
/nix/store/dqgc6xxg9hdxbcbq67xl9xkk6wjzipbw-dtkwidget-2.0.10/lib/pkgconfig/dtkwidget.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/f86qfg964p23c1fhwav02ygyj8n1n5k1-dde-qt-dbus-factory-1.1.1/lib/pkgconfig/dframeworkdbus.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/hzqm6v98y7qinlyn44c7p5kzhblbh9fd-system-path/lib/pkgconfig/dtkwidget.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/hzqm6v98y7qinlyn44c7p5kzhblbh9fd-system-path/lib/pkgconfig/dframeworkdbus.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/hzqm6v98y7qinlyn44c7p5kzhblbh9fd-system-path/lib/pkgconfig/dtkwm.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/hzqm6v98y7qinlyn44c7p5kzhblbh9fd-system-path/lib/pkgconfig/gsettings-qt.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/hzqm6v98y7qinlyn44c7p5kzhblbh9fd-system-path/lib/pkgconfig/dde-network-utils.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/hzqm6v98y7qinlyn44c7p5kzhblbh9fd-system-path/lib/pkgconfig/dtkcore.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/i5hkb29wwdiqq0a96pb4h3zgl0fcbn2n-dde-network-utils-0.1.2/lib/pkgconfig/dde-network-utils.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/r0wpcgv0gh9aklfx46rawsjdx8g0kz24-dtkcore-2.0.10/lib/pkgconfig/dtkcore.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/sj25s075byn18r5m3m5dz7y8lxnpgd2c-qtbase-5.12.0-dev/lib/pkgconfig/Qt5OpenGL.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/sj25s075byn18r5m3m5dz7y8lxnpgd2c-qtbase-5.12.0-dev/lib/pkgconfig/Qt5Xml.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/sj25s075byn18r5m3m5dz7y8lxnpgd2c-qtbase-5.12.0-dev/lib/pkgconfig/Qt5Network.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/sj25s075byn18r5m3m5dz7y8lxnpgd2c-qtbase-5.12.0-dev/lib/pkgconfig/Qt5Concurrent.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/sj25s075byn18r5m3m5dz7y8lxnpgd2c-qtbase-5.12.0-dev/lib/pkgconfig/Qt5Sql.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/sj25s075byn18r5m3m5dz7y8lxnpgd2c-qtbase-5.12.0-dev/lib/pkgconfig/Qt5OpenGLExtensions.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/sj25s075byn18r5m3m5dz7y8lxnpgd2c-qtbase-5.12.0-dev/lib/pkgconfig/Qt5PrintSupport.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/sj25s075byn18r5m3m5dz7y8lxnpgd2c-qtbase-5.12.0-dev/lib/pkgconfig/Qt5Widgets.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/sj25s075byn18r5m3m5dz7y8lxnpgd2c-qtbase-5.12.0-dev/lib/pkgconfig/Qt5Core.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/sj25s075byn18r5m3m5dz7y8lxnpgd2c-qtbase-5.12.0-dev/lib/pkgconfig/Qt5Gui.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/sj25s075byn18r5m3m5dz7y8lxnpgd2c-qtbase-5.12.0-dev/lib/pkgconfig/Qt5Test.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/sj25s075byn18r5m3m5dz7y8lxnpgd2c-qtbase-5.12.0-dev/lib/pkgconfig/Qt5DBus.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/sqd45f6x83ksc7c7r71krbc1g9w3p61f-gsettings-qt-0.1.20170824/lib/pkgconfig/gsettings-qt.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0
/nix/store/x27ikvrgm5gddpmpgl5nil0rbsrzipyz-dtkwm-2.0.9/lib/pkgconfig/dtkwm.pc:prefix=/nix/store/0xl6z46rffkb526dwx0a0ki1rhwv67w3-qtbase-5.12.0

Is this ok?

Edit: adding QMAKE_PKGCONFIG_PREFIX = $$PREFIX' to dde-network-utils.pro would fix this.
But I am not sure it is needed.

Is it better to have this fix in the patch file, or with sed in postPatch?

Edit: fxed it using the patch file.

@romildo
Copy link
Contributor Author

romildo commented Apr 7, 2019

@GrahamcOfBorg build deepin.dde-network-utils

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

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

Rather interesting that we need to set

QMAKE_PKGCONFIG_PREFIX = $$PREFIX

to get a prefix that's not from qtbase.

Other than that this should be fine.

@worldofpeace worldofpeace merged commit 0068412 into NixOS:master Apr 8, 2019
@romildo
Copy link
Contributor Author

romildo commented Apr 8, 2019

Thanks @worldofpeace.

@romildo romildo deleted the upd.deepin.dde-network-utils branch April 8, 2019 09:24
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