From a426c5aad7a6a3ceed83691aee1481d5f18a5998 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 12 Apr 2019 17:14:38 +0800 Subject: [PATCH] use NixOS 19.03 multiarch gdb instead of custom build --- .cargo/config | 2 +- nix/gdb.nix | 13 ------------- release.nix | 2 -- shell.nix | 9 +-------- 4 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 nix/gdb.nix diff --git a/.cargo/config b/.cargo/config index a1f54ec..8db196c 100644 --- a/.cargo/config +++ b/.cargo/config @@ -1,5 +1,5 @@ [target.thumbv7em-none-eabihf] -runner = "arm-none-eabihf-gdb -q -x openocd.gdb" +runner = "gdb -q -x openocd.gdb" rustflags = [ "-C", "link-arg=-Tlink.x", ] diff --git a/nix/gdb.nix b/nix/gdb.nix deleted file mode 100644 index 9d281db..0000000 --- a/nix/gdb.nix +++ /dev/null @@ -1,13 +0,0 @@ -# TODO: gdb 8.2.1 from NixOS >= 19.XX is multiarch by default. -# remove the following as `gdb` is already in scope - -{ stdenv, gdb }: - -gdb.override { - stdenv = stdenv.override { - targetPlatform = { - config = "arm-none-eabihf"; - libc = "newlib"; - }; - }; -} diff --git a/release.nix b/release.nix index 6a3c433..115b5e8 100644 --- a/release.nix +++ b/release.nix @@ -5,7 +5,6 @@ with pkgs; let - gdb = callPackage ./nix/gdb.nix {}; adc2tcp = callPackage ./default.nix { inherit rustManifest; mozillaOverlay = import ; @@ -13,5 +12,4 @@ let in { build = lib.hydraJob adc2tcp; - gdb = lib.hydraJob gdb; } diff --git a/shell.nix b/shell.nix index 0016a1e..b6b38a0 100644 --- a/shell.nix +++ b/shell.nix @@ -3,23 +3,16 @@ let mozillaOverlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz); pkgs = import { overlays = [ mozillaOverlay ]; }; - # `lib.systems.examples.armhf-embedded` from nixpkgs master - # (TODO: use directly starting with NixOS 19.0X) - targetPlatform = { - config = "arm-none-eabihf"; - libc = "newlib"; - }; in with pkgs; let rustPlatform = callPackage ./nix/rustPlatform.nix {}; openocd = callPackage ./nix/openocd.nix {}; - gdb = callPackage ./nix/gdb.nix {}; in stdenv.mkDerivation { name = "adc2tcp-env"; buildInputs = with rustPlatform.rust; [ - rustc cargo gdb + rustc cargo pkgs.gdb ]; # Set Environment Variables