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 + ''; +}