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 {
|
||||
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 {
|
||||
name = "artiq-firmware-cargo-deps";
|
||||
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
|
||||
|
||||
|
@ -65,7 +65,7 @@ in
|
|||
|
||||
python3Packages.buildPythonPackage rec {
|
||||
name = "artiq";
|
||||
src = import ./artiq-src.nix { inherit fetchgit; };
|
||||
src = import ./artiq-src.nix;
|
||||
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 ];
|
||||
checkPhase = "python -m unittest discover -v artiq.test";
|
||||
|
|
15
main.nix
15
main.nix
|
@ -1,15 +1,10 @@
|
|||
{ pkgs ? import <nixpkgs> {}}:
|
||||
let
|
||||
artiqSrc = <artiqSrc>;
|
||||
generatedNix = pkgs.runCommand "generated-nix" { buildInputs = [ pkgs.nix pkgs.git ]; }
|
||||
artiqSrc = builtins.toString <artiqSrc>;
|
||||
generatedNix = pkgs.runCommand "generated-nix" { }
|
||||
''
|
||||
cp --no-preserve=mode,ownership -R ${./artiq} $out
|
||||
REV=`git --git-dir ${artiqSrc}/.git rev-parse HEAD`
|
||||
HASH=`nix-hash --type sha256 --base32 ${artiqSrc}`
|
||||
cat > $out/pkgs/artiq-src.nix << EOF
|
||||
{ fetchgit }:
|
||||
${artiqSrc}
|
||||
EOF
|
||||
echo ${artiqSrc} > $out/pkgs/artiq-src.nix
|
||||
'';
|
||||
artiqPkgs = import "${generatedNix}/default.nix" { inherit pkgs; };
|
||||
|
||||
|
@ -27,7 +22,7 @@ let
|
|||
start // {
|
||||
"artiq-board-${board.target}-${board.variant}" = boardBinaries;
|
||||
"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;
|
||||
target = board.target;
|
||||
variant = board.variant;
|
||||
|
@ -37,7 +32,7 @@ let
|
|||
jobs = {
|
||||
conda-artiq = import "${generatedNix}/conda-build.nix" { inherit pkgs; } {
|
||||
name = "conda-artiq";
|
||||
src = import "${generatedNix}/pkgs/artiq-src.nix" { fetchgit = pkgs.fetchgit; };
|
||||
src = import "${generatedNix}/pkgs/artiq-src.nix";
|
||||
recipe = "conda/artiq";
|
||||
};
|
||||
} // boardJobs // artiqPkgs;
|
||||
|
|
Loading…
Reference in New Issue