forked from M-Labs/nix-scripts
centralize/simplify version management
This commit is contained in:
parent
ee649bf364
commit
065f6edb95
|
@ -1,21 +1,18 @@
|
|||
{ pkgs }:
|
||||
{ artiqSrc, boardBinaries, target, variant }:
|
||||
{ target, variant, boardBinaries }:
|
||||
|
||||
with pkgs;
|
||||
|
||||
let
|
||||
version = import ./pkgs/artiq-version.nix;
|
||||
fakeCondaSource = runCommand "fake-condasrc-artiq-board-${target}-${variant}" { }
|
||||
''
|
||||
cp --no-preserve=mode,ownership -R ${artiqSrc} $out
|
||||
mkdir $out/fake-conda;
|
||||
mkdir -p $out/fake-conda;
|
||||
|
||||
cat << EOF > $out/fake-conda/meta.yaml
|
||||
package:
|
||||
name: artiq-board-${target}-${variant}
|
||||
version: 5e.{{ environ["GIT_FULL_HASH"][:8] }}
|
||||
|
||||
source:
|
||||
git_url: ..
|
||||
version: ${version}
|
||||
|
||||
build:
|
||||
noarch: python
|
||||
|
|
|
@ -4,18 +4,25 @@ with pkgs;
|
|||
|
||||
let
|
||||
artiqSrc = import ./pkgs/artiq-src.nix { inherit fetchgit; };
|
||||
version = import ./pkgs/artiq-version.nix;
|
||||
fakeCondaSource = runCommand "fake-condasrc-artiq" { }
|
||||
''
|
||||
cp --no-preserve=mode,ownership -R ${artiqSrc} $out
|
||||
mkdir $out/fake-conda;
|
||||
mkdir -p $out/fake-conda;
|
||||
|
||||
# work around yet more idiotic conda behavior - build breaks if write permissions aren't set on source files.
|
||||
cp --no-preserve=mode,ownership -R ${artiqSrc} workaround-conda
|
||||
pushd workaround-conda
|
||||
tar cf $out/src.tar .
|
||||
popd
|
||||
rm -rf workaround-conda
|
||||
|
||||
cat << EOF > $out/fake-conda/meta.yaml
|
||||
package:
|
||||
name: artiq
|
||||
version: 5e.{{ environ["GIT_FULL_HASH"][:8] }}
|
||||
version: ${version}
|
||||
|
||||
source:
|
||||
git_url: ..
|
||||
url: ../src.tar
|
||||
|
||||
{% set data = load_setup_py_data() %}
|
||||
|
||||
|
|
|
@ -22,10 +22,9 @@ let
|
|||
start // {
|
||||
"artiq-board-${board.target}-${board.variant}" = boardBinaries;
|
||||
"conda-artiq-board-${board.target}-${board.variant}" = import ./conda-artiq-board.nix { inherit pkgs; } {
|
||||
artiqSrc = import ./pkgs/artiq-src.nix { fetchgit = pkgs.fetchgit; };
|
||||
boardBinaries = boardBinaries;
|
||||
target = board.target;
|
||||
variant = board.variant;
|
||||
boardBinaries = boardBinaries;
|
||||
};
|
||||
}) {} boards;
|
||||
in rec {
|
||||
|
|
|
@ -64,7 +64,8 @@ pyqtgraph-qt5 = python3Packages.buildPythonPackage rec {
|
|||
in
|
||||
|
||||
python3Packages.buildPythonPackage rec {
|
||||
name = "artiq";
|
||||
name = "artiq-${version}";
|
||||
version = import ./artiq-version.nix;
|
||||
src = import ./artiq-src.nix { inherit fetchgit; };
|
||||
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 ];
|
||||
|
|
Loading…
Reference in New Issue