Compare commits

...

5 Commits

6 changed files with 53 additions and 30 deletions

View File

@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {} { pkgs ? import <artiq-fast/pkgs/nixpkgs.nix> { inherit (import <nixpkgs> {}) fetchgit; } {}
, artiq-fast ? <artiq-fast> , artiq-fast ? <artiq-fast>
}: }:
@ -22,7 +22,7 @@ let
echo -n $HASH > $out/sinara-hash.txt echo -n $HASH > $out/sinara-hash.txt
cat > $out/default.nix << EOF cat > $out/default.nix << EOF
{ pkgs ? import <nixpkgs> {} { pkgs ? import ./fast/pkgs/nixpkgs.git { inherit (import <nixpkgs> {}) fetchgit; }
}: }:
let let

View File

@ -30,6 +30,22 @@ let
EOF EOF
echo "{ stdenv, git, fetchgit }: \"$MAJOR_VERSION.$COMMIT_COUNT.`cut -c1-8 <<< $REV`$SUFFIX\"" > $out/pkgs/artiq-version.nix echo "{ stdenv, git, fetchgit }: \"$MAJOR_VERSION.$COMMIT_COUNT.`cut -c1-8 <<< $REV`$SUFFIX\"" > $out/pkgs/artiq-version.nix
echo "{ stdenv, git, fetchgit }: \"$TIMESTAMP\"" > $out/pkgs/artiq-timestamp.nix echo "{ stdenv, git, fetchgit }: \"$TIMESTAMP\"" > $out/pkgs/artiq-timestamp.nix
REV=`git --git-dir ${<nixpkgs>}/.git rev-parse HEAD`
NIXPKGS_CLEAN=`mktemp -d`
cp -a ${<nixpkgs>}/. $NIXPKGS_CLEAN
chmod -R 755 $NIXPKGS_CLEAN/.git
chmod 755 $NIXPKGS_CLEAN
rm -rf $NIXPKGS_CLEAN/.git
HASH=`nix-hash --type sha256 --base32 $NIXPKGS_CLEAN`
cat > $out/pkgs/nixpkgs.nix << EOF
{ fetchgit }:
import (fetchgit {
url = "https://github.com/nixos/nixpkgs.git";
rev = "$REV";
sha256 = "$HASH";
})
EOF
''; '';
artiqpkgs = import "${generatedNix}/default.nix" { inherit pkgs; }; artiqpkgs = import "${generatedNix}/default.nix" { inherit pkgs; };
artiqVersion = import "${generatedNix}/pkgs/artiq-version.nix" (with pkgs; { inherit stdenv fetchgit git; }); artiqVersion = import "${generatedNix}/pkgs/artiq-version.nix" (with pkgs; { inherit stdenv fetchgit git; });

View File

@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {}}: { pkgs ? import ./pkgs/nixpkgs.nix { inherit (import <nixpkgs> {}) fetchgit; } {}}:
with pkgs; with pkgs;
let let
artiq6 = pkgs.lib.strings.versionAtLeast mainPackages.artiq.version "6.0"; artiq6 = pkgs.lib.strings.versionAtLeast mainPackages.artiq.version "6.0";

View File

@ -0,0 +1,6 @@
{ fetchgit }:
import (fetchgit {
url = "https://github.com/nixos/nixpkgs.git";
rev = "1c7f02b0b9f115ccbc122ce39ae99debc1af857a";
sha256 = "14sichs3hyg4ybcacvzglw97lg747y1ls5lsazv0n5yxv5w06l3d";
})

View File

@ -1,5 +1,10 @@
{ pkgs ? import <nixpkgs> {} { a6p ? <a6p>
, a6p ? <a6p> , artiq-fast ? (
if a6p
then <artiq-board-generated/fast>
else <artiq-fast>
)
, pkgs ? import (artiq-fast + "/pkgs/nixpkgs.nix") { inherit (import <nixpkgs> {}) fetchgit; } {}
}: }:
let let
@ -13,10 +18,6 @@ let
sha256 = sinaraSystemsHash; sha256 = sinaraSystemsHash;
} }
else <sinaraSystemsSrc>; else <sinaraSystemsSrc>;
artiq-fast =
if a6p
then <artiq-board-generated/fast>
else <artiq-fast>;
artiqVersion = import (artiq-fast + "/pkgs/artiq-version.nix") { artiqVersion = import (artiq-fast + "/pkgs/artiq-version.nix") {
inherit (pkgs) stdenv git fetchgit; inherit (pkgs) stdenv git fetchgit;
}; };
@ -74,7 +75,7 @@ let
HASH=`nix-hash --type sha256 --base32 $SINARA_SRC_CLEAN` HASH=`nix-hash --type sha256 --base32 $SINARA_SRC_CLEAN`
''} ''}
cat > $out/default.nix << EOF cat > $out/default.nix << EOF
{ pkgs ? import <nixpkgs> {}}: { pkgs ? import ./fast/pkgs/nixpkgs.nix { inherit (import <nixpkgs> {}) fetchgit; } {} }:
let let
artiq-fast = import ${if a6p then "./board-generated" else "."}/fast { inherit pkgs; }; artiq-fast = import ${if a6p then "./board-generated" else "."}/fast { inherit pkgs; };

View File

@ -9,10 +9,10 @@
"schedulingshares": 10, "schedulingshares": 10,
"enableemail": false, "enableemail": false,
"emailoverride": "", "emailoverride": "",
"keepnr": 10, "keepnr": 1,
"inputs": { "inputs": {
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false }, "nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false },
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }, "nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
"artiqSrc": { "type": "git", "value": "git://github.com/m-labs/artiq.git master 1", "emailresponsible": false } "artiqSrc": { "type": "git", "value": "git://github.com/m-labs/artiq.git master 1", "emailresponsible": false }
} }
}, },
@ -26,10 +26,10 @@
"schedulingshares": 1, "schedulingshares": 1,
"enableemail": false, "enableemail": false,
"emailoverride": "", "emailoverride": "",
"keepnr": 10, "keepnr": 1,
"inputs": { "inputs": {
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false }, "nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false },
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }, "nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
"sinaraSystemsSrc": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/sinara-systems.git master 1", "emailresponsible": false }, "sinaraSystemsSrc": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/sinara-systems.git master 1", "emailresponsible": false },
"artiq-fast": { "type": "sysbuild", "value": "artiq:fast-beta:generated-nix", "emailresponsible": false } "artiq-fast": { "type": "sysbuild", "value": "artiq:fast-beta:generated-nix", "emailresponsible": false }
} }
@ -44,10 +44,10 @@
"schedulingshares": 1, "schedulingshares": 1,
"enableemail": false, "enableemail": false,
"emailoverride": "", "emailoverride": "",
"keepnr": 10, "keepnr": 1,
"inputs": { "inputs": {
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false }, "nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false },
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }, "nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
"a6p": { "type": "boolean", "value": "true" }, "a6p": { "type": "boolean", "value": "true" },
"artiq-board-generated": { "type": "sysbuild", "value": "artiq:board-generated-beta:generated-nix", "emailresponsible": false } "artiq-board-generated": { "type": "sysbuild", "value": "artiq:board-generated-beta:generated-nix", "emailresponsible": false }
} }
@ -63,10 +63,10 @@
"schedulingshares": 10, "schedulingshares": 10,
"enableemail": false, "enableemail": false,
"emailoverride": "", "emailoverride": "",
"keepnr": 10, "keepnr": 1,
"inputs": { "inputs": {
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false }, "nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false },
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }, "nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
"artiqSrc": { "type": "git", "value": "git://github.com/m-labs/artiq.git release-6 1", "emailresponsible": false } "artiqSrc": { "type": "git", "value": "git://github.com/m-labs/artiq.git release-6 1", "emailresponsible": false }
} }
}, },
@ -80,10 +80,10 @@
"schedulingshares": 1, "schedulingshares": 1,
"enableemail": false, "enableemail": false,
"emailoverride": "", "emailoverride": "",
"keepnr": 10, "keepnr": 1,
"inputs": { "inputs": {
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false }, "nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false },
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }, "nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
"sinaraSystemsSrc": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/sinara-systems.git master 1", "emailresponsible": false }, "sinaraSystemsSrc": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/sinara-systems.git master 1", "emailresponsible": false },
"artiq-fast": { "type": "sysbuild", "value": "artiq:fast:generated-nix", "emailresponsible": false } "artiq-fast": { "type": "sysbuild", "value": "artiq:fast:generated-nix", "emailresponsible": false }
} }
@ -98,10 +98,10 @@
"schedulingshares": 1, "schedulingshares": 1,
"enableemail": false, "enableemail": false,
"emailoverride": "", "emailoverride": "",
"keepnr": 10, "keepnr": 1,
"inputs": { "inputs": {
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false }, "nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false },
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }, "nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
"a6p": { "type": "boolean", "value": "true" }, "a6p": { "type": "boolean", "value": "true" },
"artiq-board-generated": { "type": "sysbuild", "value": "artiq:board-generated:generated-nix", "emailresponsible": false } "artiq-board-generated": { "type": "sysbuild", "value": "artiq:board-generated:generated-nix", "emailresponsible": false }
} }
@ -117,10 +117,10 @@
"schedulingshares": 10, "schedulingshares": 10,
"enableemail": false, "enableemail": false,
"emailoverride": "", "emailoverride": "",
"keepnr": 10, "keepnr": 1,
"inputs": { "inputs": {
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.03", "emailresponsible": false }, "nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.03", "emailresponsible": false },
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }, "nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
"artiqSrc": { "type": "git", "value": "git://github.com/m-labs/artiq.git release-5 1", "emailresponsible": false } "artiqSrc": { "type": "git", "value": "git://github.com/m-labs/artiq.git release-5 1", "emailresponsible": false }
} }
}, },
@ -134,10 +134,10 @@
"schedulingshares": 1, "schedulingshares": 1,
"enableemail": false, "enableemail": false,
"emailoverride": "", "emailoverride": "",
"keepnr": 10, "keepnr": 1,
"inputs": { "inputs": {
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.03", "emailresponsible": false }, "nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.03", "emailresponsible": false },
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }, "nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
"sinaraSystemsSrc": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/sinara-systems.git master 1", "emailresponsible": false }, "sinaraSystemsSrc": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/sinara-systems.git master 1", "emailresponsible": false },
"a6p": { "type": "boolean", "value": "false" }, "a6p": { "type": "boolean", "value": "false" },
"artiq-fast": { "type": "sysbuild", "value": "artiq:fast-legacy:generated-nix", "emailresponsible": false } "artiq-fast": { "type": "sysbuild", "value": "artiq:fast-legacy:generated-nix", "emailresponsible": false }
@ -154,10 +154,10 @@
"schedulingshares": 1, "schedulingshares": 1,
"enableemail": false, "enableemail": false,
"emailoverride": "", "emailoverride": "",
"keepnr": 10, "keepnr": 1,
"inputs": { "inputs": {
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false }, "nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false },
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }, "nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
"urukulSrc": { "type": "git", "value": "git://github.com/quartiq/urukul", "emailresponsible": false }, "urukulSrc": { "type": "git", "value": "git://github.com/quartiq/urukul", "emailresponsible": false },
"mirnySrc": { "type": "git", "value": "git://github.com/quartiq/mirny", "emailresponsible": false }, "mirnySrc": { "type": "git", "value": "git://github.com/quartiq/mirny", "emailresponsible": false },
"fastinoSrc": { "type": "git", "value": "git://github.com/quartiq/fastino", "emailresponsible": false }, "fastinoSrc": { "type": "git", "value": "git://github.com/quartiq/fastino", "emailresponsible": false },
@ -175,10 +175,10 @@
"schedulingshares": 1, "schedulingshares": 1,
"enableemail": false, "enableemail": false,
"emailoverride": "", "emailoverride": "",
"keepnr": 10, "keepnr": 1,
"inputs": { "inputs": {
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false }, "nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs nixos-20.09", "emailresponsible": false },
"nixScripts": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/nix-scripts.git", "emailresponsible": false }, "nixScripts": { "type": "git", "value": "https://git.m-labs.hk/astro/nix-scripts.git", "emailresponsible": false },
"artiq-fast": { "type": "sysbuild", "value": "artiq:fast:generated-nix", "emailresponsible": false }, "artiq-fast": { "type": "sysbuild", "value": "artiq:fast:generated-nix", "emailresponsible": false },
"zynq-rs": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/zynq-rs.git", "emailresponsible": false }, "zynq-rs": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/zynq-rs.git", "emailresponsible": false },
"artiq-zynq": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/artiq-zynq.git", "emailresponsible": false } "artiq-zynq": { "type": "git", "value": "https://git.m-labs.hk/M-Labs/artiq-zynq.git", "emailresponsible": false }