Closed sondr3 closed 5 years ago
Thanks for the report! I suspect though that this is an outdated version of cargo-vendor
and an update is needed, but if that doesn't work please let me know!
Whoops, yeah, you're correct. The cargo-vendor
version in NixOS is practically ancient. That explains it, thanks!
For those coming here from Google or such: I believe this was fixed with https://github.com/NixOS/nixpkgs/pull/57017
Correct, this is now fixed and works as it should in Nix(OS) :smile:
One of my programs just ran into this error when trying to build it for NixOS:
With the relevant parts of my Cargo.toml here:
This builds fine locally on my machine with
cargo build [--release]
, but when I try to build it in NixOS and my derivation for it the error above pops up. I tried tracking down where it could come from myself but as far as I understood it the configuration itself calls out to the Cargo library itself and I quickly got lost in the source code due to the size and my lack of familiarity with it.I found that it is supposed to be a
StringOrBool
here. From the cargo manifest it can indeed be both, but at this point I'm out of ideas as to what might be the cause of this. Any ideas where this might come from?NixOS system information
```text - system: `"x86_64-linux"` - host os: `Linux 5.0.7, NixOS, 19.03.172138.5c52b25283a (Koi)` - multi-user?: `yes` - sandbox: `yes` - version: `nix-env (Nix) 2.2` - channels(root): `"nixos-19.03.172138.5c52b25283a, unstable-19.09pre174426.acbdaa569f4"` - channels(sondre): `""` - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos` ```Nix derivation
```nix { stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl, darwin }: with rustPlatform; buildRustPackage rec { name = "git-ignore-${version}"; version = "2019-04-17"; cargoSha256 = "1fqfy8lnvpn5sd3l73x2p359zq4303vsrdgw3aphvy6580yjb84d"; src = fetchFromGitHub { owner = "sondr3"; repo = "git-ignore"; rev = "0075815beb69ce2647d7fb5384d90533eee847f4"; sha256 = "1hx4z1l510rqd2kr01c33r97w3l6gm46wl2f799jc2647klfxscq"; }; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; preFixup = '' mkdir -p "$out/man/man1" cp target/git-ignore.1 "$out/man/man1/" ''; meta = with stdenv.lib; { description = "Quickly and easily fetch .gitignore templates from gitignore.io"; homepage = https://github.com/sondr3/git-ignore; license = licenses.gpl3Plus; platforms = platforms.all; maintainers = [ maintainers.sondr3 ]; }; } ```