forked from M-Labs/nix-scripts
fix/cleanup previous attempts at using /nix/store entry
This commit is contained in:
parent
4e42d89b3f
commit
ee72921382
@ -9,7 +9,7 @@ let
|
|||||||
fetchcargo = import ./fetchcargo.nix {
|
fetchcargo = import ./fetchcargo.nix {
|
||||||
inherit (pkgs) stdenv cacert git cargo cargo-vendor;
|
inherit (pkgs) stdenv cacert git cargo cargo-vendor;
|
||||||
};
|
};
|
||||||
artiqSrc = import ./pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; };
|
artiqSrc = import ./pkgs/artiq-src.nix;
|
||||||
cargoDeps = fetchcargo rec {
|
cargoDeps = fetchcargo rec {
|
||||||
name = "artiq-firmware-cargo-deps";
|
name = "artiq-firmware-cargo-deps";
|
||||||
src = "${artiqSrc}/artiq/firmware";
|
src = "${artiqSrc}/artiq/firmware";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, git, fetchFromGitHub, fetchgit, python3Packages, qt5Full, binutils-or1k, llvm-or1k, llvmlite, python3 }:
|
{ stdenv, git, fetchFromGitHub, python3Packages, qt5Full, binutils-or1k, llvm-or1k, llvmlite, python3 }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ in
|
|||||||
|
|
||||||
python3Packages.buildPythonPackage rec {
|
python3Packages.buildPythonPackage rec {
|
||||||
name = "artiq";
|
name = "artiq";
|
||||||
src = import ./artiq-src.nix { inherit fetchgit; };
|
src = import ./artiq-src.nix;
|
||||||
buildInputs = [ git ];
|
buildInputs = [ git ];
|
||||||
propagatedBuildInputs = with python3Packages; [ binutils-or1k llvm-or1k llvmlite levenshtein pyqtgraph-qt5 aiohttp pygit2 pythonparser numpy dateutil quamash scipy prettytable pyserial asyncserial h5py cython regex qt5Full pyqt5 ];
|
propagatedBuildInputs = with python3Packages; [ binutils-or1k llvm-or1k llvmlite levenshtein pyqtgraph-qt5 aiohttp pygit2 pythonparser numpy dateutil quamash scipy prettytable pyserial asyncserial h5py cython regex qt5Full pyqt5 ];
|
||||||
checkPhase = "python -m unittest discover -v artiq.test";
|
checkPhase = "python -m unittest discover -v artiq.test";
|
||||||
|
15
main.nix
15
main.nix
@ -1,15 +1,10 @@
|
|||||||
{ pkgs ? import <nixpkgs> {}}:
|
{ pkgs ? import <nixpkgs> {}}:
|
||||||
let
|
let
|
||||||
artiqSrc = <artiqSrc>;
|
artiqSrc = builtins.toString <artiqSrc>;
|
||||||
generatedNix = pkgs.runCommand "generated-nix" { buildInputs = [ pkgs.nix pkgs.git ]; }
|
generatedNix = pkgs.runCommand "generated-nix" { }
|
||||||
''
|
''
|
||||||
cp --no-preserve=mode,ownership -R ${./artiq} $out
|
cp --no-preserve=mode,ownership -R ${./artiq} $out
|
||||||
REV=`git --git-dir ${artiqSrc}/.git rev-parse HEAD`
|
echo ${artiqSrc} > $out/pkgs/artiq-src.nix
|
||||||
HASH=`nix-hash --type sha256 --base32 ${artiqSrc}`
|
|
||||||
cat > $out/pkgs/artiq-src.nix << EOF
|
|
||||||
{ fetchgit }:
|
|
||||||
${artiqSrc}
|
|
||||||
EOF
|
|
||||||
'';
|
'';
|
||||||
artiqPkgs = import "${generatedNix}/default.nix" { inherit pkgs; };
|
artiqPkgs = import "${generatedNix}/default.nix" { inherit pkgs; };
|
||||||
|
|
||||||
@ -27,7 +22,7 @@ let
|
|||||||
start // {
|
start // {
|
||||||
"artiq-board-${board.target}-${board.variant}" = boardBinaries;
|
"artiq-board-${board.target}-${board.variant}" = boardBinaries;
|
||||||
"conda-artiq-board-${board.target}-${board.variant}" = import "${generatedNix}/conda-board.nix" { inherit pkgs; } {
|
"conda-artiq-board-${board.target}-${board.variant}" = import "${generatedNix}/conda-board.nix" { inherit pkgs; } {
|
||||||
artiqSrc = import "${generatedNix}/pkgs/artiq-src.nix" { fetchgit = pkgs.fetchgit; };
|
artiqSrc = import "${generatedNix}/pkgs/artiq-src.nix";
|
||||||
boardBinaries = boardBinaries;
|
boardBinaries = boardBinaries;
|
||||||
target = board.target;
|
target = board.target;
|
||||||
variant = board.variant;
|
variant = board.variant;
|
||||||
@ -37,7 +32,7 @@ let
|
|||||||
jobs = {
|
jobs = {
|
||||||
conda-artiq = import "${generatedNix}/conda-build.nix" { inherit pkgs; } {
|
conda-artiq = import "${generatedNix}/conda-build.nix" { inherit pkgs; } {
|
||||||
name = "conda-artiq";
|
name = "conda-artiq";
|
||||||
src = import "${generatedNix}/pkgs/artiq-src.nix" { fetchgit = pkgs.fetchgit; };
|
src = import "${generatedNix}/pkgs/artiq-src.nix";
|
||||||
recipe = "conda/artiq";
|
recipe = "conda/artiq";
|
||||||
};
|
};
|
||||||
} // boardJobs // artiqPkgs;
|
} // boardJobs // artiqPkgs;
|
||||||
|
Loading…
Reference in New Issue
Block a user