From d2028867533d515c6fc4a1c96eee46c64fc55174 Mon Sep 17 00:00:00 2001 From: occheung Date: Wed, 30 Sep 2020 15:57:46 +0800 Subject: [PATCH] nix: simplify --- shell.nix | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/shell.nix b/shell.nix index 40908c2..09abfda 100644 --- a/shell.nix +++ b/shell.nix @@ -8,28 +8,10 @@ let rustPlatform = callPackage ./nix/rustPlatform.nix {}; itm = callPackage ./nix/itm.nix {inherit rustPlatform;}; - runOpenOcd = writeShellScriptBin "run-openocd" '' - openocd \ - -f openocd/openocd.cfg \ - -c init & - sleep 1 - ''; - runOpenOcdBlock = writeShellScriptBin "run-openocd-block" '' openocd -f openocd/openocd.cfg ''; - setGDBConfigFile = writeShellScriptBin "set-gdb-config-file" '' - if [[ $1 == "" ]] - then - sed -i "2s/.*/runner = \"gdb -q -x gdb_config\/openocd.gdb\"/" .cargo/config - echo "GDB config file: openocd.gdb" - else - sed -i "2s/.*/runner = \"gdb -q -x gdb_config\/$1.gdb\"/" .cargo/config - echo "GDB config file: $1.gdb" - fi - ''; - openocdFlash = writeShellScriptBin "openocd-flash" '' openocd -f openocd/openocd.cfg -f openocd/$1.cfg ''; @@ -40,7 +22,7 @@ let in stdenv.mkDerivation { - name = "nix-shell"; + name = "Humpback-DDS"; buildInputs = with rustPlatform.rust; [ (pkgs.python3.withPackages(ps: [ migen ])) pkgs.yosys @@ -52,9 +34,7 @@ in rustc cargo itm - runOpenOcd runOpenOcdBlock - setGDBConfigFile openocdFlash publishMqtt ];