{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/22177","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/22177/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/22177/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/22177/events","html_url":"https://github.com/NixOS/nixpkgs/issues/22177","id":203441136,"number":22177,"title":"[replace] doesn't replace in rustBuildPackage","user":{"login":"P-E-Meunier","id":17021304,"avatar_url":"https://avatars.githubusercontent.com/u/17021304?v=3","gravatar_id":"","url":"https://api.github.com/users/P-E-Meunier","html_url":"https://github.com/P-E-Meunier","followers_url":"https://api.github.com/users/P-E-Meunier/followers","following_url":"https://api.github.com/users/P-E-Meunier/following{/other_user}","gists_url":"https://api.github.com/users/P-E-Meunier/gists{/gist_id}","starred_url":"https://api.github.com/users/P-E-Meunier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/P-E-Meunier/subscriptions","organizations_url":"https://api.github.com/users/P-E-Meunier/orgs","repos_url":"https://api.github.com/users/P-E-Meunier/repos","events_url":"https://api.github.com/users/P-E-Meunier/events{/privacy}","received_events_url":"https://api.github.com/users/P-E-Meunier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-01-26T17:50:14Z","updated_at":"2017-01-27T18:10:19Z","closed_at":null,"body":"## Issue description\r\n\r\nThe `[replace]` section of `Cargo.toml` is not handled by `buildRustPackage`, which issues the following warning (in my case, when replacing package `ring:0.6.2` with a local version):\r\n\r\n```\r\nwarning: package replacement is not used: https://github.com/rust-lang/crates.io-index#ring:0.6.2\r\n```\r\n\r\nThat section can be used to override a package with some locally fixed package.\r\n\r\nThis is not a big problem until one tries to quickly fix a bug in a dependency and `nixops` it into production.\r\n\r\n### Steps to reproduce\r\n\r\nCreate a crate with the following `src/main.rs`:\r\n\r\n```\r\nextern crate ring;\r\nfn main() {}\r\n```\r\n\r\nClone `http://github.com/briansmith/ring` at the root of the crate.\r\nAnd the following lines in `Cargo.toml`:\r\n\r\n```\r\nring = \"0.6.2\"\r\n\r\n[replace]\r\nring:0.6.2 = { path = \"ring\" }\r\n```\r\n\r\nNow package it with `rustBuildPackage`. The replacement is ignored.\r\n\r\n## Technical details\r\n\r\n* System: (NixOS: `nixos-version`, Ubuntu/Fedora: `lsb_release -a`, ...)\r\n16.09.1515.89c567c (Flounder)\r\n\r\n* Nix version: (run `nix-env --version`)\r\nnix-env (Nix) 1.11.6\r\n\r\n* Nixpkgs version: (run `nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion`)\r\n17.03pre-git\r\n"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/275733119","html_url":"https://github.com/NixOS/nixpkgs/issues/22177#issuecomment-275733119","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/22177","id":275733119,"user":{"login":"P-E-Meunier","id":17021304,"avatar_url":"https://avatars.githubusercontent.com/u/17021304?v=3","gravatar_id":"","url":"https://api.github.com/users/P-E-Meunier","html_url":"https://github.com/P-E-Meunier","followers_url":"https://api.github.com/users/P-E-Meunier/followers","following_url":"https://api.github.com/users/P-E-Meunier/following{/other_user}","gists_url":"https://api.github.com/users/P-E-Meunier/gists{/gist_id}","starred_url":"https://api.github.com/users/P-E-Meunier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/P-E-Meunier/subscriptions","organizations_url":"https://api.github.com/users/P-E-Meunier/orgs","repos_url":"https://api.github.com/users/P-E-Meunier/repos","events_url":"https://api.github.com/users/P-E-Meunier/events{/privacy}","received_events_url":"https://api.github.com/users/P-E-Meunier/received_events","type":"User","site_admin":false},"created_at":"2017-01-27T18:10:19Z","updated_at":"2017-01-27T18:10:19Z","body":"> Are you sure you are specifying the version inside the [replace] section correctly?\r\n\r\nYes, because `cargo build` is able to handle it correctly, in a `nix-shell` with the same versions of everything as my `rustBuildPackage`.\r\n\r\n> you can try to either switch to the unstable branch of nixpkgs/NixOS, or to backport all the Rust-related changes in the unstable branch to your own local git checkout of the stable branch.\r\n\r\nI'm working on a modified local checkout of nixpkgs, and I tried this both with my own rustup nightly fetcher, and the one in NixOS unstable.\r\n\r\nMy problem is, my project requires Rust nightly, and ring 0.6.2 stopped building on nightly this week (I could build it with rustup from January 22nd)."}}
{"actor":{"display_login":"P-E-Meunier"}}