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

svgbobrus: init at 2017-08-29 #28819

Closed
wants to merge 1 commit into from

Conversation

matthiasbeyer
Copy link
Contributor

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
    • Linux
  • 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.

Pinging @kevincox as requested.

This fails with

ERROR: The Cargo.lock file doesn't exist

@Mic92
Copy link
Member

Mic92 commented Sep 1, 2017

The solution is to add a Cargo.lock. Either ask the project to do so or run cargo update in the project and add the Cargo.lock as a patch to the project. Otherwise we can not build this project reproducible.

@matthiasbeyer
Copy link
Contributor Author

Ah, I see my problem: The commandline binary "svgbob_cli" is actually a subdir of the repository. And there is also the Cargo.lock file.

How to specify a subdir as the actual target?

@Mic92
Copy link
Member

Mic92 commented Sep 1, 2017

Set the sourceRoot variable would be my wild guess.

@kevincox
Copy link
Contributor

kevincox commented Sep 1, 2017

Seems like it should work. This is what

does.

@matthiasbeyer
Copy link
Contributor Author

Hm... does not work for me. Also not without the "rus" part.

@kevincox
Copy link
Contributor

kevincox commented Sep 1, 2017

I'll take a look when I get home but often what I do it add set -i somewhere so that I can see what it is doing, that often helps me find out what I am setting wrong. You can see other rust packages to find spots where you can inject this.

sha256 = "1bbh6inrif2y8159j4y1nvnrcf3fscrhb3zrshfms4847pms42cs";
};

depsSha256 = "19lrj4i6vzmf22r6xg99zcwvzjpiar8pqin1m2nvv78xzxx5yvgb";

sourceRoot = "${name}rus/svgbob_cli";
sourceRoot = "svgbobrus-${rev}-src/svgbob_cli";
Copy link
Member

Choose a reason for hiding this comment

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

You also need to update rustRegistry:

Using rust registry from /nix/store/z01ibnk837dchls2xirjm171k2sb51f6-rustRegistry-2017-08-27
warning: custom registry support via the `registry.index` configuration is being removed, this functionality will not work in the future
    Updating registry `file:///nix/store/z01ibnk837dchls2xirjm171k2sb51f6-rustRegistry-2017-08-27`
    Updating registry `file:///nix/store/z01ibnk837dchls2xirjm171k2sb51f6-rustRegistry-2017-08-27`
error: no matching package named `svgbob` found (required by `svgbob_cli`)
location searched: registry file:///nix/store/z01ibnk837dchls2xirjm171k2sb51f6-rustRegistry-2017-08-27
version required: = 0.2.1
versions found: 0.2.0, 0.1.14, 0.1.13, ...
note: keeping build directory ‘/tmp/nix-build-svgbob-fetch.drv-5’
builder for ‘/nix/store/3c5gh2c48k56112apv3wz407dv98iq4i-svgbob-fetch.drv’ failed with exit code 101
cannot build derivation ‘/nix/store/8svy5vvhxr03a8ragj5apyjgyb2a5xyc-svgbob.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/8svy5vvhxr03a8ragj5apyjgyb2a5xyc-svgbob.drv’ failed
/run/current-system/sw/bin/nix-shell: failed to build all dependencies

@matthiasbeyer
Copy link
Contributor Author

Okay, now I only get a compiletime error (when compiling svgbobrus) because the nightly toolchain is required instead of stable. Everything else seems to work.

@kevincox
Copy link
Contributor

kevincox commented Sep 1, 2017

Hmm, I don't actually know how to use nightly. There is a passthru.rustc which might work but I haven't tried it.

@Mic92
Copy link
Member

Mic92 commented Sep 2, 2017

There is rustBeta and rustNightly. However both are broken at the moment in master. rustNightlyBin.buildRustPackage might work.

@orivej
Copy link
Contributor

orivej commented Nov 2, 2017

#30088 has deleted rustNightly. @matthiasbeyer would you try to resurrect or close this PR?

@matthiasbeyer
Copy link
Contributor Author

Well, I do not care about that software this much anymore... shall we close it then?

@Mic92
Copy link
Member

Mic92 commented Nov 2, 2017

this is up to you.

@matthiasbeyer matthiasbeyer deleted the package-svgbobrus branch November 2, 2017 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants