mirror of https://github.com/m-labs/artiq.git
build MSYS2 packages
This commit is contained in:
parent
724fc62925
commit
a4bdc6c9cb
26
flake.lock
26
flake.lock
|
@ -11,11 +11,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1647688999,
|
"lastModified": 1649124276,
|
||||||
"narHash": "sha256-K99rYlmfCZmfam4m07hLZVg7m2zT5ul62wVGdpmjciA=",
|
"narHash": "sha256-l1+vk7cvj4cjl83wRx/y1Jwdds4e8xAzpxHrXusEZ5A=",
|
||||||
"owner": "m-labs",
|
"owner": "m-labs",
|
||||||
"repo": "artiq-comtools",
|
"repo": "artiq-comtools",
|
||||||
"rev": "7eb367b2df7510dd4fa7ccba3682b2ff64a5d982",
|
"rev": "e2d85f2e51ecdac463da752ef754e59572f9e119",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -45,11 +45,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1648584347,
|
"lastModified": 1649124608,
|
||||||
"narHash": "sha256-m27UgTuWDO6rLkwNdxBeGXW7rLZbdl5vCp7afe0P4qo=",
|
"narHash": "sha256-ZBmCeuOSZTxa9c9nbdFtSCDy940HlMAhNNh5TA42f1E=",
|
||||||
"ref": "master",
|
"ref": "master",
|
||||||
"rev": "b8ef44d64eabf62175d2b3e900124e0607c7b4d3",
|
"rev": "e05b0bf5dc427952a60b0dbe696de2ea239d9206",
|
||||||
"revCount": 710,
|
"revCount": 724,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.m-labs.hk/m-labs/nac3.git"
|
"url": "https://git.m-labs.hk/m-labs/nac3.git"
|
||||||
},
|
},
|
||||||
|
@ -60,11 +60,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1647992509,
|
"lastModified": 1649024309,
|
||||||
"narHash": "sha256-AG40Nt5OWz0LBs5p457emOuwLKOvTtcv/2fUdnEN3Ws=",
|
"narHash": "sha256-AWbvj/NHZXVwAnHaVOFlxg7tcNerEKrKBmgGfztSHWM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d2caa9377539e3b5ff1272ac3aa2d15f3081069f",
|
"rev": "af0a9bc0e5341855518e9c1734d7ef913e5138b9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -92,11 +92,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1647688038,
|
"lastModified": 1649124180,
|
||||||
"narHash": "sha256-IceTSKu1sQB8sFmDTzvmurlEHWL1cV29N0mUY5F7vUY=",
|
"narHash": "sha256-NxGYtKeUqvABCkCBixJ1cDJGTPooHh4I2MuWfj0i0Ok=",
|
||||||
"owner": "m-labs",
|
"owner": "m-labs",
|
||||||
"repo": "sipyco",
|
"repo": "sipyco",
|
||||||
"rev": "1a9a3062451f5c5b125b006d1b9bee997f986abd",
|
"rev": "0d61fba000d03692ee5aa66c813977e7db085c31",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -336,6 +336,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
packages.x86_64-w64-mingw32 = import ./windows { inherit sipyco nac3 artiq-comtools; artiq = self; };
|
||||||
|
|
||||||
inherit makeArtiqBoardPackage;
|
inherit makeArtiqBoardPackage;
|
||||||
|
|
||||||
defaultPackage.x86_64-linux = packages.x86_64-linux.python3-mimalloc.withPackages(ps: [ packages.x86_64-linux.artiq ]);
|
defaultPackage.x86_64-linux = packages.x86_64-linux.python3-mimalloc.withPackages(ps: [ packages.x86_64-linux.artiq ]);
|
||||||
|
@ -361,6 +363,9 @@
|
||||||
|
|
||||||
hydraJobs = {
|
hydraJobs = {
|
||||||
inherit (packages.x86_64-linux) artiq artiq-board-kc705-nist_clock openocd-bscanspi;
|
inherit (packages.x86_64-linux) artiq artiq-board-kc705-nist_clock openocd-bscanspi;
|
||||||
|
sipyco-msys2-pkg = packages.x86_64-w64-mingw32.sipyco-pkg;
|
||||||
|
artiq-comtools-msys2-pkg = packages.x86_64-w64-mingw32.artiq-comtools-pkg;
|
||||||
|
artiq-msys2-pkg = packages.x86_64-w64-mingw32.artiq-pkg;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
pkgbase="mingw-w64-artiq"
|
||||||
|
pkgname="mingw-w64-x86_64-artiq"
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="A leading-edge control system for quantum information experiments"
|
||||||
|
license=("LGPL")
|
||||||
|
depends=("mingw-w64-x86_64-python")
|
||||||
|
|
||||||
|
source PKGBUILD.common
|
|
@ -0,0 +1,8 @@
|
||||||
|
pkgbase="mingw-w64-artiq-comtools"
|
||||||
|
pkgname="mingw-w64-x86_64-artiq-comtools"
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Lightweight ARTIQ communication tools"
|
||||||
|
license=("LGPL")
|
||||||
|
depends=("mingw-w64-x86_64-python")
|
||||||
|
|
||||||
|
source PKGBUILD.common
|
|
@ -0,0 +1,19 @@
|
||||||
|
arch=("any")
|
||||||
|
mingw_arch=("mingw64")
|
||||||
|
pkgver=${DRV_VERSION}
|
||||||
|
url="https://m-labs.hk"
|
||||||
|
source=("source.tar")
|
||||||
|
sha256sums=("SKIP")
|
||||||
|
|
||||||
|
build() {
|
||||||
|
mkdir mingw64
|
||||||
|
export PYTHONPATH=`pwd`/mingw64/lib/python3.9/site-packages
|
||||||
|
chmod +w -R source
|
||||||
|
cd source
|
||||||
|
wine-msys2-build python setup.py install --prefix=../mingw64
|
||||||
|
cd ..
|
||||||
|
}
|
||||||
|
|
||||||
|
package() {
|
||||||
|
cp -R mingw64 ${pkgdir}
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
pkgbase="mingw-w64-sipyco"
|
||||||
|
pkgname="mingw-w64-x86_64-sipyco"
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Simple Python Communications"
|
||||||
|
license=("LGPL")
|
||||||
|
depends=("mingw-w64-x86_64-python")
|
||||||
|
|
||||||
|
source PKGBUILD.common
|
|
@ -0,0 +1,46 @@
|
||||||
|
{ sipyco, nac3, artiq-comtools, artiq }:
|
||||||
|
let
|
||||||
|
pkgs = import nac3.inputs.nixpkgs { system = "x86_64-linux"; };
|
||||||
|
makeMsys2 = { name, version, src }: pkgs.stdenvNoCC.mkDerivation {
|
||||||
|
pname = "${name}-msys2-pkg";
|
||||||
|
inherit version;
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pkgs.pacman pkgs.fakeroot pkgs.libarchive pkgs.zstd pkgs.file
|
||||||
|
nac3.packages.x86_64-w64-mingw32.wine-msys2-build
|
||||||
|
];
|
||||||
|
inherit src;
|
||||||
|
phases = [ "buildPhase" "installPhase" ];
|
||||||
|
buildPhase =
|
||||||
|
''
|
||||||
|
export DRV_VERSION=${version}
|
||||||
|
ln -s ${./PKGBUILD.${name}} PKGBUILD
|
||||||
|
ln -s ${./PKGBUILD.common} PKGBUILD.common
|
||||||
|
ln -s $src source
|
||||||
|
tar cfh source.tar source
|
||||||
|
rm source
|
||||||
|
makepkg --config ${./makepkg.conf} --nodeps
|
||||||
|
'';
|
||||||
|
installPhase =
|
||||||
|
''
|
||||||
|
mkdir $out $out/nix-support
|
||||||
|
cp *.pkg.tar.zst $out
|
||||||
|
echo file msys2 $out/*.pkg.tar.zst >> $out/nix-support/hydra-build-products
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
sipyco-pkg = makeMsys2 {
|
||||||
|
name = "sipyco";
|
||||||
|
src = sipyco;
|
||||||
|
inherit (sipyco.packages.x86_64-linux.sipyco) version;
|
||||||
|
};
|
||||||
|
artiq-comtools-pkg = makeMsys2 {
|
||||||
|
name = "artiq-comtools";
|
||||||
|
src = artiq-comtools;
|
||||||
|
inherit (artiq-comtools.packages.x86_64-linux.artiq-comtools) version;
|
||||||
|
};
|
||||||
|
artiq-pkg = makeMsys2 {
|
||||||
|
name = "artiq";
|
||||||
|
src = artiq;
|
||||||
|
inherit (artiq.packages.x86_64-linux.artiq) version;
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
PKGEXT='.pkg.tar.zst'
|
||||||
|
SRCEXT='.src.tar.gz'
|
Loading…
Reference in New Issue