forked from M-Labs/artiq
1
0
Fork 0

nix: install flash proxy bitstreams with OpenOCD

This commit is contained in:
Sebastien Bourdeauducq 2019-01-24 16:47:37 +08:00
parent 0a0e8c3c93
commit 31592fc8e4
1 changed files with 15 additions and 6 deletions

View File

@ -2,7 +2,7 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "openocd-${version}"; name = "openocd-${version}";
version = "0.10.0"; version = "0.10.0.mlabs";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "m-labs"; owner = "m-labs";
@ -11,6 +11,12 @@ stdenv.mkDerivation rec {
rev = "c383a57adcff332b2c5cf8d55a84626285b42c2c"; rev = "c383a57adcff332b2c5cf8d55a84626285b42c2c";
sha256 = "0xlj9cs72acx3zqagvr7f1c0v6lnqhl8fgrlhgmhmvk5n9knk492"; sha256 = "0xlj9cs72acx3zqagvr7f1c0v6lnqhl8fgrlhgmhmvk5n9knk492";
}; };
bscan_spi_bitstreams = fetchFromGitHub {
owner = "quartiq";
repo = "bscan_spi_bitstreams";
rev = "a628956da7dc794e6e3c95b31ff9ce3af58bc763";
sha256 = "1cydbym3wv9jwxh6lw9im1mjzr7w8rzzx95bxkjschmzjq4h13vk";
};
nativeBuildInputs = [ pkgconfig ]; nativeBuildInputs = [ pkgconfig ];
buildInputs = [ autoreconfHook libftdi libusb1 hidapi ]; buildInputs = [ autoreconfHook libftdi libusb1 hidapi ];
@ -42,6 +48,9 @@ stdenv.mkDerivation rec {
exit 1 exit 1
fi fi
ln -s "$rules" "$out/etc/udev/rules.d/" ln -s "$rules" "$out/etc/udev/rules.d/"
mkdir -p "$out/share/bscan-spi-bitstreams"
cp ${bscan_spi_bitstreams}/*.bit "$out/share/bscan-spi-bitstreams"
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {