From e139c5b80ef64ceb6aae6ae0a1bf2ce0d28ddc19 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 31 Mar 2019 22:18:36 +0800 Subject: [PATCH] build libartiq_support.so (#3) --- artiq/default.nix | 1 + artiq/pkgs/libartiq-support.nix | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 artiq/pkgs/libartiq-support.nix diff --git a/artiq/default.nix b/artiq/default.nix index 811172e..54734bf 100644 --- a/artiq/default.nix +++ b/artiq/default.nix @@ -41,6 +41,7 @@ in binutils-or1k = callPackage ./pkgs/binutils-or1k.nix {}; llvm-or1k = callPackage ./pkgs/llvm-or1k.nix { inherit llvm-src; }; llvmlite-artiq = callPackage ./pkgs/llvmlite-artiq.nix { inherit llvm-or1k; }; + libartiq-support = callPackage ./pkgs/libartiq-support.nix { inherit rustc; }; artiq = callPackage ./pkgs/artiq.nix { inherit binutils-or1k; inherit llvm-or1k; inherit llvmlite-artiq; }; artiq-env = (pkgs.python3.withPackages(ps: [ artiq ])).overrideAttrs (oldAttrs: { name = "${pkgs.python3.name}-artiq-env-${artiq.version}"; }); openocd = callPackage ./pkgs/openocd.nix {}; diff --git a/artiq/pkgs/libartiq-support.nix b/artiq/pkgs/libartiq-support.nix new file mode 100644 index 0000000..3f4a7a0 --- /dev/null +++ b/artiq/pkgs/libartiq-support.nix @@ -0,0 +1,13 @@ +{ stdenv, fetchgit, rustc }: +stdenv.mkDerivation rec { + name = "libartiq-support-${version}"; + version = import ./artiq-version.nix; + src = import ./artiq-src.nix { inherit fetchgit; }; + phases = [ "buildPhase" ]; + # keep in sync with artiq/test/lit/lit.cfg or remove build from the latter once we don't use buildbot/conda anymore + buildPhase = + '' + mkdir $out + ${rustc}/bin/rustc ${src}/artiq/test/libartiq_support/lib.rs --out-dir $out -Cpanic=unwind -g + ''; +}