fix check.nur (dont use builtin fetchers when stdenv ones are available)
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
{ pkgs
|
{ pkgs
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, lib
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
@@ -8,7 +9,17 @@ let
|
|||||||
rev = "8e2d180329f4009ac06042b50ca0a356722aea19";
|
rev = "8e2d180329f4009ac06042b50ca0a356722aea19";
|
||||||
hash = "sha256-8rKI+MKmWOpEy7XKRMURph4b6VkMkh+Nr20hkpyk5hM=";
|
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 ];
|
final = pkgs.appendOverlays [ overlay ];
|
||||||
in src.overrideAttrs (base: {
|
in src.overrideAttrs (base: {
|
||||||
# passthru only nixpkgs-wayland's own packages -- not the whole nixpkgs-with-nixpkgs-wayland-as-overlay:
|
# passthru only nixpkgs-wayland's own packages -- not the whole nixpkgs-with-nixpkgs-wayland-as-overlay:
|
||||||
|
@@ -20,18 +20,24 @@
|
|||||||
, doPatch ? true
|
, doPatch ? true
|
||||||
, localSystem ? builtins.currentSystem #< not available in pure mode
|
, localSystem ? builtins.currentSystem #< not available in pure mode
|
||||||
, system ? localSystem
|
, system ? localSystem
|
||||||
|
, fetchzip ? builtins.fetchTarball
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
unpatchedSrc = builtins.fetchGit {
|
lock = {
|
||||||
url = "https://github.com/NixOS/nixpkgs.git";
|
master.rev = "716a7056386dcc67eb3b813289499d6329d4befc";
|
||||||
ref = variant;
|
master.sha256 = "sha256:1skv9nbnspi3pphk4jzvcj147796m4wqdx8iwdbnl9h4nd3kw6n2";
|
||||||
rev = {
|
staging.rev = "da9d22446697971278edcd4af92f63221f7d21f6";
|
||||||
master = "716a7056386dcc67eb3b813289499d6329d4befc";
|
staging.sha256 = "sha256:0yccyg071zn77i1pfb49dz07difwx5k3w1g0l1vdzlc3xiv9dgmk";
|
||||||
staging = "da9d22446697971278edcd4af92f63221f7d21f6";
|
staging-next.rev = "5aa86ae5585cd46299ee46682fda8a9b76baf2ae";
|
||||||
staging-next = "5aa86ae5585cd46299ee46682fda8a9b76baf2ae";
|
staging-next.sha256 = "sha256:1dqws7fmdv4l9mk45i88ivzlxzm2b4lbdg9rg4am0z1alsz36dzz";
|
||||||
}."${variant}";
|
|
||||||
};
|
};
|
||||||
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 { };
|
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 = {
|
args = {
|
||||||
inherit localSystem;
|
inherit localSystem;
|
||||||
config = {
|
config = {
|
||||||
@@ -60,4 +66,4 @@ let
|
|||||||
in
|
in
|
||||||
# N.B.: this is crafted to allow `nixpkgs.FOO` from other nix code
|
# N.B.: this is crafted to allow `nixpkgs.FOO` from other nix code
|
||||||
# AND `nix-build -A nixpkgs`
|
# AND `nix-build -A nixpkgs`
|
||||||
src // (import "${src}" args)
|
(import "${src}" args) // src
|
||||||
|
@@ -64,7 +64,7 @@ let
|
|||||||
modemmanager-split = callPackage ./additional/modemmanager-split { };
|
modemmanager-split = callPackage ./additional/modemmanager-split { };
|
||||||
mx-sanebot = callPackage ./additional/mx-sanebot { };
|
mx-sanebot = callPackage ./additional/mx-sanebot { };
|
||||||
networkmanager-split = callPackage ./additional/networkmanager-split { };
|
networkmanager-split = callPackage ./additional/networkmanager-split { };
|
||||||
nixpkgs = import ./additional/nixpkgs {
|
nixpkgs = callPackage ./additional/nixpkgs {
|
||||||
localSystem = stdenv.buildPlatform.system;
|
localSystem = stdenv.buildPlatform.system;
|
||||||
system = stdenv.hostPlatform.system;
|
system = stdenv.hostPlatform.system;
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user