mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-26 05:57:28 +00:00
nixVersions: use hash instead of sha256
This commit is contained in:
parent
36f9f01750
commit
94fdd2a40a
@ -1,11 +1,11 @@
|
||||
{ lib, fetchFromGitHub
|
||||
, version
|
||||
, suffix ? ""
|
||||
, sha256 ? null
|
||||
, src ? fetchFromGitHub { owner = "NixOS"; repo = "nix"; rev = version; inherit sha256; }
|
||||
, hash ? null
|
||||
, src ? fetchFromGitHub { owner = "NixOS"; repo = "nix"; rev = version; inherit hash; }
|
||||
, patches ? [ ]
|
||||
}:
|
||||
assert (sha256 == null) -> (src != null);
|
||||
assert (hash == null) -> (src != null);
|
||||
let
|
||||
atLeast24 = lib.versionAtLeast version "2.4pre";
|
||||
atLeast25 = lib.versionAtLeast version "2.5pre";
|
||||
|
@ -32,7 +32,7 @@ let
|
||||
owner = "aws";
|
||||
repo = "aws-sdk-cpp";
|
||||
rev = version;
|
||||
sha256 = "sha256-Z1eRKW+8nVD53GkNyYlZjCcT74MqFqqRMeMc33eIQ9g=";
|
||||
hash = "sha256-Z1eRKW+8nVD53GkNyYlZjCcT74MqFqqRMeMc33eIQ9g=";
|
||||
};
|
||||
postPatch = ''
|
||||
# Avoid blanket -Werror to evade build failures on less
|
||||
@ -94,21 +94,21 @@ let
|
||||
patch-monitorfdhup = fetchpatch2 {
|
||||
name = "nix-7585-monitor-fd-hup.patch";
|
||||
url = "https://github.com/NixOS/nix/commit/1df3d62c769dc68c279e89f68fdd3723ed3bcb5a.patch";
|
||||
sha256 = "sha256-f+F0fUO+bqyPXjt+IXJtISVr589hdc3y+Cdrxznb+Nk=";
|
||||
hash = "sha256-f+F0fUO+bqyPXjt+IXJtISVr589hdc3y+Cdrxznb+Nk=";
|
||||
};
|
||||
|
||||
# https://github.com/NixOS/nix/pull/7473
|
||||
patch-sqlite-exception = fetchpatch2 {
|
||||
name = "nix-7473-sqlite-exception-add-message.patch";
|
||||
url = "https://github.com/hercules-ci/nix/commit/c965f35de71cc9d88f912f6b90fd7213601e6eb8.patch";
|
||||
sha256 = "sha256-tI5nKU7SZgsJrxiskJ5nHZyfrWf5aZyKYExM0792N80=";
|
||||
hash = "sha256-tI5nKU7SZgsJrxiskJ5nHZyfrWf5aZyKYExM0792N80=";
|
||||
};
|
||||
|
||||
patch-non-existing-output = fetchpatch {
|
||||
# https://github.com/NixOS/nix/pull/7283
|
||||
name = "fix-requires-non-existing-output.patch";
|
||||
url = "https://github.com/NixOS/nix/commit/3ade5f5d6026b825a80bdcc221058c4f14e10a27.patch";
|
||||
sha256 = "sha256-s1ybRFCjQaSGj7LKu0Z5g7UiHqdJGeD+iPoQL0vaiS0=";
|
||||
hash = "sha256-s1ybRFCjQaSGj7LKu0Z5g7UiHqdJGeD+iPoQL0vaiS0=";
|
||||
};
|
||||
|
||||
in lib.makeExtensible (self: {
|
||||
@ -116,7 +116,7 @@ in lib.makeExtensible (self: {
|
||||
version = "2.3.16";
|
||||
src = fetchurl {
|
||||
url = "https://nixos.org/releases/nix/nix-${version}/nix-${version}.tar.xz";
|
||||
sha256 = "sha256-fuaBtp8FtSVJLSAsO+3Nne4ZYLuBj2JpD2xEk7fCqrw=";
|
||||
hash = "sha256-fuaBtp8FtSVJLSAsO+3Nne4ZYLuBj2JpD2xEk7fCqrw=";
|
||||
};
|
||||
patches = [
|
||||
patch-monitorfdhup
|
||||
@ -137,7 +137,7 @@ in lib.makeExtensible (self: {
|
||||
|
||||
nix_2_10 = common {
|
||||
version = "2.10.3";
|
||||
sha256 = "sha256-B9EyDUz/9tlcWwf24lwxCFmkxuPTVW7HFYvp0C4xGbc=";
|
||||
hash = "sha256-B9EyDUz/9tlcWwf24lwxCFmkxuPTVW7HFYvp0C4xGbc=";
|
||||
patches = [
|
||||
./patches/flaky-tests.patch
|
||||
patch-non-existing-output
|
||||
@ -148,7 +148,7 @@ in lib.makeExtensible (self: {
|
||||
|
||||
nix_2_11 = common {
|
||||
version = "2.11.1";
|
||||
sha256 = "sha256-qCV65kw09AG+EkdchDPq7RoeBznX0Q6Qa4yzPqobdOk=";
|
||||
hash = "sha256-qCV65kw09AG+EkdchDPq7RoeBznX0Q6Qa4yzPqobdOk=";
|
||||
patches = [
|
||||
./patches/flaky-tests.patch
|
||||
patch-non-existing-output
|
||||
@ -159,7 +159,7 @@ in lib.makeExtensible (self: {
|
||||
|
||||
nix_2_12 = common {
|
||||
version = "2.12.1";
|
||||
sha256 = "sha256-GmHKhq0uFtdOiJnuBwj2YwlZjvh6YTkfQZgeu4e0dLU=";
|
||||
hash = "sha256-GmHKhq0uFtdOiJnuBwj2YwlZjvh6YTkfQZgeu4e0dLU=";
|
||||
patches = [
|
||||
./patches/flaky-tests.patch
|
||||
patch-monitorfdhup
|
||||
@ -169,17 +169,17 @@ in lib.makeExtensible (self: {
|
||||
|
||||
nix_2_13 = common {
|
||||
version = "2.13.3";
|
||||
sha256 = "sha256-jUc2ccTR8f6MGY2pUKgujm+lxSPNGm/ZAP+toX+nMNc=";
|
||||
hash = "sha256-jUc2ccTR8f6MGY2pUKgujm+lxSPNGm/ZAP+toX+nMNc=";
|
||||
};
|
||||
|
||||
nix_2_14 = common {
|
||||
version = "2.14.1";
|
||||
sha256 = "sha256-5aCmGZbsFcLIckCDfvnPD4clGPQI7qYAqHYlttN/Wkg=";
|
||||
hash = "sha256-5aCmGZbsFcLIckCDfvnPD4clGPQI7qYAqHYlttN/Wkg=";
|
||||
};
|
||||
|
||||
nix_2_15 = common {
|
||||
version = "2.15.1";
|
||||
sha256 = "sha256-o7bxsNeq2LF6/dTl+lT2k50bSItkID80/uoZYVtlxro=";
|
||||
hash = "sha256-o7bxsNeq2LF6/dTl+lT2k50bSItkID80/uoZYVtlxro=";
|
||||
};
|
||||
|
||||
stable = self.nix_2_13;
|
||||
|
Loading…
Reference in New Issue
Block a user