artiq-fast: pin nixpkgs, use in artiq-board-generated+artiq-full

attempt at gitea issue #31
This commit is contained in:
Astro 2021-03-08 01:26:44 +01:00
parent 50fb3cd8e1
commit 649b4a6b99
4 changed files with 18 additions and 10 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

@ -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,7 @@
{ fetchgit }:
import (fetchgit {
url = "https://github.com/nixos/nixpkgs.git";
# nixos-21.09 as of 2021-03-08
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; };