From d1a55f88766b72769e5f756f8b4724e13e1c6981 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sat, 23 Oct 2021 19:03:02 +0200 Subject: l coaxmetal.r: build with unstable --- lass/1systems/coaxmetal/source.nix | 23 ++++++++++++++++++++--- lass/krops.nix | 2 +- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/lass/1systems/coaxmetal/source.nix b/lass/1systems/coaxmetal/source.nix index 0e2628b5b..7f335ec05 100644 --- a/lass/1systems/coaxmetal/source.nix +++ b/lass/1systems/coaxmetal/source.nix @@ -1,4 +1,21 @@ -{ lib, pkgs, ... }: -{ - nixpkgs.git.ref = lib.mkForce (lib.importJSON ../../../krebs/nixpkgs-unstable.json).rev; +{ lib, pkgs, test, ... }: let + npkgs = lib.importJSON ../../../krebs/nixpkgs-unstable.json; +in { + nixpkgs = lib.mkForce (if test then { derivation = let + rev = npkgs.rev; + sha256 = npkgs.sha256; + in '' + with import (builtins.fetchTarball { + url = "https://github.com/nixos/nixpkgs/archive/${rev}.tar.gz"; + sha256 = "${sha256}"; + }) {}; + pkgs.fetchFromGitHub { + owner = "nixos"; + repo = "nixpkgs"; + rev = "${rev}"; + sha256 = "${sha256}"; + } + ''; } else { + git.ref = npkgs.rev; + }); } diff --git a/lass/krops.nix b/lass/krops.nix index 128c9ee04..fe5c00f3d 100644 --- a/lass/krops.nix +++ b/lass/krops.nix @@ -24,7 +24,7 @@ }; }; } - (if (lib.pathExists (./. + "/1systems/${name}/source.nix")) && (! test) then + (if lib.pathExists (./. + "/1systems/${name}/source.nix") then import (./. + "/1systems/${name}/source.nix") { inherit lib pkgs test; } else {} -- cgit v1.2.3