From 949adbd90a4a0e426c38d125d787f096ffdf5996 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 25 Aug 2020 16:59:57 +0800 Subject: [PATCH] cargo-xbuild: cleanup --- shell.nix | 2 +- xbuild.nix | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/shell.nix b/shell.nix index 8114b84..b65c694 100644 --- a/shell.nix +++ b/shell.nix @@ -5,7 +5,7 @@ let rustPlatform = (import ./rustPlatform.nix { inherit pkgs; }); artiqpkgs = import "${artiq-fast}/default.nix" { inherit pkgs; }; vivado = import "${artiq-fast}/vivado.nix" { inherit pkgs; }; - xbuild = (import ./xbuild.nix ); + xbuild = import ./xbuild.nix { inherit pkgs; }; in pkgs.stdenv.mkDerivation { name = "artiq-zynq-env"; diff --git a/xbuild.nix b/xbuild.nix index 787c31c..7c818e3 100644 --- a/xbuild.nix +++ b/xbuild.nix @@ -1,12 +1,9 @@ -let - pkgs = import {}; -in -with pkgs; +{ pkgs }: pkgs.rustPlatform.buildRustPackage rec { pname = "cargo-xbuild"; version = "0.5.21"; - src = fetchFromGitHub { + src = pkgs.fetchFromGitHub { owner = "rust-osdev"; repo = pname; rev = "v${version}"; @@ -17,7 +14,7 @@ pkgs.rustPlatform.buildRustPackage rec { cargoSha256 = "1pj4x8y5vfpnn8vhxqqm3vicn29870r3jh0b17q3riq4vz1a2afp"; - meta = with stdenv.lib; { + meta = with pkgs.stdenv.lib; { description = "Automatically cross-compiles the sysroot crates core, compiler_builtins, and alloc"; homepage = "https://github.com/rust-osdev/cargo-xbuild"; license = with licenses; [ mit asl20 ];