From 5d8ffd44ef5786bbeaee90f378fa9b1db9e70dc9 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 9 Jun 2020 14:30:23 +0800 Subject: [PATCH] move conda files to dedicated folder --- artiq-fast/conda-artiq.nix | 23 ------------------- .../artiq-deps.nix} | 0 artiq-fast/conda/artiq.nix | 23 +++++++++++++++++++ .../{conda-build.nix => conda/build.nix} | 2 +- .../builder-env.nix} | 0 .../fake-source.nix} | 0 artiq-fast/default.nix | 7 +++--- artiq-fast/windows/install.nix | 2 +- 8 files changed, 29 insertions(+), 28 deletions(-) delete mode 100644 artiq-fast/conda-artiq.nix rename artiq-fast/{conda-artiq-deps.nix => conda/artiq-deps.nix} (100%) create mode 100644 artiq-fast/conda/artiq.nix rename artiq-fast/{conda-build.nix => conda/build.nix} (88%) rename artiq-fast/{conda-builder-env.nix => conda/builder-env.nix} (100%) rename artiq-fast/{conda-fake-source.nix => conda/fake-source.nix} (100%) diff --git a/artiq-fast/conda-artiq.nix b/artiq-fast/conda-artiq.nix deleted file mode 100644 index 50021c2..0000000 --- a/artiq-fast/conda-artiq.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ pkgs }: - -let - version = import ./pkgs/artiq-version.nix (with pkgs; { inherit stdenv fetchgit git; }); - fakeCondaSource = import ./conda-fake-source.nix { inherit pkgs; } { - name = "artiq"; - inherit version; - src = import ./pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; }; - dependencies = import ./conda-artiq-deps.nix; - extraYaml = - '' - about: - home: https://m-labs.hk/artiq - license: LGPL - summary: 'A leading-edge control system for quantum information experiments' - ''; - }; - conda-artiq = import ./conda-build.nix { inherit pkgs; } { - name = "conda-artiq"; - src = fakeCondaSource; - }; -in - conda-artiq diff --git a/artiq-fast/conda-artiq-deps.nix b/artiq-fast/conda/artiq-deps.nix similarity index 100% rename from artiq-fast/conda-artiq-deps.nix rename to artiq-fast/conda/artiq-deps.nix diff --git a/artiq-fast/conda/artiq.nix b/artiq-fast/conda/artiq.nix new file mode 100644 index 0000000..5f8c1db --- /dev/null +++ b/artiq-fast/conda/artiq.nix @@ -0,0 +1,23 @@ +{ pkgs }: + +let + version = import ../pkgs/artiq-version.nix (with pkgs; { inherit stdenv fetchgit git; }); + fakeCondaSource = import ./fake-source.nix { inherit pkgs; } { + name = "artiq"; + inherit version; + src = import ../pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; }; + dependencies = import ./artiq-deps.nix; + extraYaml = + '' + about: + home: https://m-labs.hk/artiq + license: LGPL + summary: 'A leading-edge control system for quantum information experiments' + ''; + }; + conda-artiq = import ./build.nix { inherit pkgs; } { + name = "conda-artiq"; + src = fakeCondaSource; + }; +in + conda-artiq diff --git a/artiq-fast/conda-build.nix b/artiq-fast/conda/build.nix similarity index 88% rename from artiq-fast/conda-build.nix rename to artiq-fast/conda/build.nix index 985a32d..612b5e4 100644 --- a/artiq-fast/conda-build.nix +++ b/artiq-fast/conda/build.nix @@ -5,7 +5,7 @@ { name, src, recipe ? "fake-conda"}: let - condaBuilderEnv = import ./conda-builder-env.nix { inherit pkgs; }; + condaBuilderEnv = import ./builder-env.nix { inherit pkgs; }; in pkgs.stdenv.mkDerivation { inherit name src; buildCommand = diff --git a/artiq-fast/conda-builder-env.nix b/artiq-fast/conda/builder-env.nix similarity index 100% rename from artiq-fast/conda-builder-env.nix rename to artiq-fast/conda/builder-env.nix diff --git a/artiq-fast/conda-fake-source.nix b/artiq-fast/conda/fake-source.nix similarity index 100% rename from artiq-fast/conda-fake-source.nix rename to artiq-fast/conda/fake-source.nix diff --git a/artiq-fast/default.nix b/artiq-fast/default.nix index 8087e04..0cccfab 100644 --- a/artiq-fast/default.nix +++ b/artiq-fast/default.nix @@ -34,14 +34,15 @@ let artiq = callPackage ./pkgs/artiq.nix { inherit binutils-or1k llvm-or1k llvmlite-artiq libartiq-support lit outputcheck; }; artiq-env = (pkgs.python3.withPackages(ps: [ artiq ])).overrideAttrs (oldAttrs: { name = "${pkgs.python3.name}-artiq-env-${artiq.version}"; }); openocd = callPackage ./pkgs/openocd.nix {}; - conda-sipyco = import ./conda-build.nix { inherit pkgs; } { + + conda-sipyco = import ./conda/build.nix { inherit pkgs; } { name = "conda-sipyco"; - src = import ./conda-fake-source.nix { inherit pkgs; } { + src = import ./conda/fake-source.nix { inherit pkgs; } { name = "sipyco"; inherit (pythonDeps.sipyco) version src; }; }; - conda-artiq = import ./conda-artiq.nix { inherit pkgs; }; + conda-artiq = import ./conda/artiq.nix { inherit pkgs; }; }; in mainPackages // boardPackages diff --git a/artiq-fast/windows/install.nix b/artiq-fast/windows/install.nix index 22c5ae0..9ac5e7a 100644 --- a/artiq-fast/windows/install.nix +++ b/artiq-fast/windows/install.nix @@ -29,7 +29,7 @@ let condaDepSpecs = builtins.concatStringsSep " " (map (s: "\"${s}\"") - (import ../conda-artiq-deps.nix)); + (import ../conda/artiq-deps.nix)); instructions = builtins.toFile "install.txt"