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

cloc: fix build #31106

Closed
wants to merge 1 commit into from
Closed

cloc: fix build #31106

wants to merge 1 commit into from

Conversation

pbogdan
Copy link
Member

@pbogdan pbogdan commented Nov 1, 2017

Motivation for this change

It doesn't build anymore. Looks to be result of c3255fe. Note that I'm not sure if this is the proper way to deal with the issue as I don't understand the offending commit.

Things done
  • 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.

@grahamc
Copy link
Member

grahamc commented Nov 1, 2017

cc @edolstra looks like your fetchzip changes made undesirable changes?

@orivej
Copy link
Contributor

orivej commented Nov 1, 2017

All projects with the same sourceRoot pattern that are likely to be broken by c3255fe:

applications/audio/puddletag/default.nix:17:  sourceRoot = "${pname}-v${version}-src/source";
applications/graphics/nomacs/default.nix:33:  sourceRoot = "${name}-src/ImageLounge";
applications/graphics/screencloud/default.nix:46:  sourceRoot = "screencloud-v${version}-src/screencloud";
applications/networking/instant-messengers/pidgin-plugins/pidgin-skypeweb/default.nix:14:  sourceRoot = "skype4pidgin-${version}-src/skypeweb";
applications/science/misc/golly/default.nix:23:  sourceRoot="${name}-src/gui-wx/configure";
development/libraries/bobcat/default.nix:19:  sourceRoot = "bobcat-${version}-src/bobcat";
development/libraries/cxxtest/default.nix:16:  sourceRoot = "${name}-src/python";
development/libraries/openvdb/default.nix:19:  sourceRoot = "openvdb-v${version}-src/openvdb";
development/tools/build-managers/icmake/default.nix:14:  sourceRoot = "icmake-${version}-src/icmake";
development/tools/misc/yodl/default.nix:18:  sourceRoot = "yodl-${version}-src/yodl";
development/tools/parsing/flexc++/default.nix:14:  sourceRoot = "flexcpp-${version}-src/flexc++";
os-specific/linux/jool/cli.nix:12:  sourceRoot = "Jool-v${sourceAttrs.version}-src/usr";
servers/http/apache-modules/tomcat-connectors/default.nix:13:  sourceRoot = "${name}-src/native";
tools/cd-dvd/unetbootin/default.nix:15:  sourceRoot = "${name}-src/src/unetbootin";
tools/compression/zstdmt/default.nix:14:  sourceRoot = "zstdmt-v${version}-src/unix";
tools/misc/cloc/default.nix:14:  sourceRoot = "cloc-${version}-src/Unix";
tools/networking/reaver-wps-t6x/default.nix:18:  sourceRoot = "reaver-wps-fork-t6x-v${version}-src/src";

Note that I'm not sure if this is the proper way to deal with the issue

It's not. Some projects found a solution in setSourceRoot:

applications/science/logic/ekrhyper/default.nix:22:  setSourceRoot = "export sourceRoot=$(echo */ekrh/src/)";
applications/science/misc/golly/beta.nix:28:    export sourceRoot="$(echo */gui-wx/configure)"
tools/misc/fontforge/fontforge-fonttools.nix:16:  setSourceRoot = ''export sourceRoot="$(echo */contrib/fonttools)"'';

@pbogdan
Copy link
Member Author

pbogdan commented Nov 2, 2017

@orivej thanks, updated to use setSourceRoot. If that's the preferred solution I could try and review other packages you listed unless you are already onto it :-).

@orivej
Copy link
Contributor

orivej commented Nov 2, 2017

Thank you! I did not plan to fix them myself, so it would be great if you can do all of them. This does not warrant one commit per package, feel free to fix everything in one commit. Note that setSourceRoot = "sourceRoot=$(echo */ekrh/src/)"; is correct even if the output of echo */ekrh/src/ contains spaces (which it does not), and export is neither needed nor desirable, so you might prefer this variant. I'd appreciate it if you could also tackle dmd: giving appropriate name attributes to invocations of fetchFromGitHub should be enough.

@pbogdan pbogdan closed this Nov 2, 2017
@pbogdan pbogdan mentioned this pull request Nov 2, 2017
8 tasks
@pbogdan pbogdan deleted the cloc-fix-build branch December 3, 2019 17:05
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

4 participants