fix check.nur (dont use builtin fetchers when stdenv ones are available)
This commit is contained in:
parent
f219c59ad5
commit
71a19e247f
|
@ -1,5 +1,6 @@
|
|||
{ pkgs
|
||||
, fetchFromGitHub
|
||||
, lib
|
||||
}:
|
||||
let
|
||||
src = fetchFromGitHub {
|
||||
|
@ -8,7 +9,17 @@ let
|
|||
rev = "8e2d180329f4009ac06042b50ca0a356722aea19";
|
||||
hash = "sha256-8rKI+MKmWOpEy7XKRMURph4b6VkMkh+Nr20hkpyk5hM=";
|
||||
};
|
||||
overlay = import "${src}/overlay.nix";
|
||||
flake = import "${src}/flake.nix";
|
||||
evaluated = flake.outputs {
|
||||
self = evaluated;
|
||||
lib-aggregate.lib = lib // {
|
||||
# mock out flake-utils, which it uses to construct flavored package sets.
|
||||
# we only need the overlay (unflavored)
|
||||
flake-utils.eachSystem = sys: fn: {};
|
||||
};
|
||||
};
|
||||
overlay = evaluated.overlay;
|
||||
|
||||
final = pkgs.appendOverlays [ overlay ];
|
||||
in src.overrideAttrs (base: {
|
||||
# passthru only nixpkgs-wayland's own packages -- not the whole nixpkgs-with-nixpkgs-wayland-as-overlay:
|
||||
|
|
|
@ -20,18 +20,24 @@
|
|||
, doPatch ? true
|
||||
, localSystem ? builtins.currentSystem #< not available in pure mode
|
||||
, system ? localSystem
|
||||
, fetchzip ? builtins.fetchTarball
|
||||
}:
|
||||
let
|
||||
unpatchedSrc = builtins.fetchGit {
|
||||
url = "https://github.com/NixOS/nixpkgs.git";
|
||||
ref = variant;
|
||||
rev = {
|
||||
master = "716a7056386dcc67eb3b813289499d6329d4befc";
|
||||
staging = "da9d22446697971278edcd4af92f63221f7d21f6";
|
||||
staging-next = "5aa86ae5585cd46299ee46682fda8a9b76baf2ae";
|
||||
}."${variant}";
|
||||
lock = {
|
||||
master.rev = "716a7056386dcc67eb3b813289499d6329d4befc";
|
||||
master.sha256 = "sha256:1skv9nbnspi3pphk4jzvcj147796m4wqdx8iwdbnl9h4nd3kw6n2";
|
||||
staging.rev = "da9d22446697971278edcd4af92f63221f7d21f6";
|
||||
staging.sha256 = "sha256:0yccyg071zn77i1pfb49dz07difwx5k3w1g0l1vdzlc3xiv9dgmk";
|
||||
staging-next.rev = "5aa86ae5585cd46299ee46682fda8a9b76baf2ae";
|
||||
staging-next.sha256 = "sha256:1dqws7fmdv4l9mk45i88ivzlxzm2b4lbdg9rg4am0z1alsz36dzz";
|
||||
};
|
||||
unpatchedNixpkgs = import "${unpatchedSrc}" { inherit localSystem; };
|
||||
unpatchedSrc = let
|
||||
lock' = lock."${variant}";
|
||||
in fetchzip {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/${lock'.rev}.tar.gz";
|
||||
inherit (lock') sha256;
|
||||
};
|
||||
unpatchedNixpkgs = import unpatchedSrc { inherit localSystem; };
|
||||
|
||||
patchesFor = unpatchedNixpkgs.callPackage ./list.nix { };
|
||||
|
||||
|
@ -45,7 +51,7 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
src = if doPatch then patchedSrc else unpatchedSrc;
|
||||
src = if doPatch then patchedSrc else { outPath = unpatchedSrc; };
|
||||
args = {
|
||||
inherit localSystem;
|
||||
config = {
|
||||
|
@ -60,4 +66,4 @@ let
|
|||
in
|
||||
# N.B.: this is crafted to allow `nixpkgs.FOO` from other nix code
|
||||
# AND `nix-build -A nixpkgs`
|
||||
src // (import "${src}" args)
|
||||
(import "${src}" args) // src
|
||||
|
|
|
@ -64,7 +64,7 @@ let
|
|||
modemmanager-split = callPackage ./additional/modemmanager-split { };
|
||||
mx-sanebot = callPackage ./additional/mx-sanebot { };
|
||||
networkmanager-split = callPackage ./additional/networkmanager-split { };
|
||||
nixpkgs = import ./additional/nixpkgs {
|
||||
nixpkgs = callPackage ./additional/nixpkgs {
|
||||
localSystem = stdenv.buildPlatform.system;
|
||||
system = stdenv.hostPlatform.system;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user