From 28781f90972469a80795347c6c498894d9142db1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Thu, 25 Mar 2021 08:19:39 +0100 Subject: [PATCH] crate2nix: use sourceRoot, so that src is a proper derivation Makes it possible to get the top-level source path as `crate2nix.src` for e.g. using `tools.nix` for IFD. --- pkgs/development/tools/rust/crate2nix/default.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/rust/crate2nix/default.nix b/pkgs/development/tools/rust/crate2nix/default.nix index 9432c4fd85d3..b5a3486da71f 100644 --- a/pkgs/development/tools/rust/crate2nix/default.nix +++ b/pkgs/development/tools/rust/crate2nix/default.nix @@ -12,13 +12,14 @@ rustPlatform.buildRustPackage rec { pname = "crate2nix"; version = "0.9.0"; - src = fetchFromGitHub - { - owner = "kolloch"; - repo = pname; - rev = version; - sha256 = "sha256-dB8wa3CQFw8ckD420zpBGw4TnsLrHqXf+ff/WuhPsVM="; - } + "/crate2nix"; + src = fetchFromGitHub { + owner = "kolloch"; + repo = pname; + rev = version; + sha256 = "sha256-dB8wa3CQFw8ckD420zpBGw4TnsLrHqXf+ff/WuhPsVM="; + }; + + sourceRoot = "source/crate2nix"; cargoSha256 = "sha256-6V0ifH63/s5XLo4BCexPtvlUH0UQPHFW8YHF8OCH3ik=";