Loading flake.nix +13 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,19 @@ nixosModules = { notDetected = ./nixos/modules/installer/scan/not-detected.nix; /* Make the `nixpkgs.*` configuration read-only. Guarantees that `pkgs` is the way you initialize it. Example: { imports = [ nixpkgs.nixosModules.readOnlyPkgs ]; nixpkgs.pkgs = nixpkgs.legacyPackages.x86_64-linux; } */ readOnlyPkgs = ./nixos/modules/misc/nixpkgs/read-only.nix; }; }; } lib/types.nix +8 −0 Original line number Diff line number Diff line Loading @@ -476,6 +476,14 @@ rec { check = x: isDerivation x && hasAttr "shellPath" x; }; pkgs = addCheck (unique { message = "A Nixpkgs pkgs set can not be merged with another pkgs set."; } attrs // { name = "pkgs"; descriptionClass = "noun"; description = "Nixpkgs package set"; }) (x: (x._type or null) == "pkgs"); path = mkOptionType { name = "path"; descriptionClass = "noun"; Loading maintainers/maintainer-list.nix +6 −0 Original line number Diff line number Diff line Loading @@ -15950,6 +15950,12 @@ githubId = 8577941; name = "Kevin Rauscher"; }; tomaskala = { email = "public+nixpkgs@tomaskala.com"; github = "tomaskala"; githubId = 7727887; name = "Tomas Kala"; }; tomberek = { email = "tomberek@gmail.com"; matrix = "@tomberek:matrix.org"; Loading maintainers/scripts/copy-tarballs.pl +51 −48 Original line number Diff line number Diff line Loading @@ -162,13 +162,18 @@ elsif (defined $expr) { # Check every fetchurl call discovered by find-tarballs.nix. my $mirrored = 0; my $have = 0; foreach my $fetch (sort { $a->{url} cmp $b->{url} } @{$fetches}) { my $url = $fetch->{url}; foreach my $fetch (sort { $a->{urls}->[0] cmp $b->{urls}->[0] } @{$fetches}) { my $urls = $fetch->{urls}; my $algo = $fetch->{type}; my $hash = $fetch->{hash}; my $name = $fetch->{name}; my $isPatch = $fetch->{isPatch}; if ($isPatch) { print STDERR "skipping $urls->[0] (support for patches is missing)\n"; next; } if ($hash =~ /^([a-z0-9]+)-([A-Za-z0-9+\/=]+)$/) { $algo = $1; $hash = `nix hash to-base16 $hash` or die; Loading @@ -183,6 +188,9 @@ elsif (defined $expr) { chomp $hash; } my $storePath = makeFixedOutputPath(0, $algo, $hash, $name); for my $url (@$urls) { if (defined $ENV{DEBUG}) { print "$url $algo $hash\n"; next; Loading @@ -193,25 +201,18 @@ elsif (defined $expr) { next; } if ($isPatch) { print STDERR "skipping $url (support for patches is missing)\n"; next; } next if defined $exclude && $url =~ /$exclude/; if (alreadyMirrored($algo, $hash)) { $have++; next; last; } my $storePath = makeFixedOutputPath(0, $algo, $hash, $name); print STDERR "mirroring $url ($storePath, $algo, $hash)...\n"; if ($dryRun) { $mirrored++; next; last; } # Substitute the output. Loading Loading @@ -239,6 +240,8 @@ elsif (defined $expr) { uploadFile($storePath, $url); $mirrored++; last; } } print STDERR "mirrored $mirrored files, already have $have files\n"; Loading maintainers/scripts/find-tarballs.nix +4 −4 Original line number Diff line number Diff line Loading @@ -9,12 +9,12 @@ let root = expr; uniqueUrls = map (x: x.file) (genericClosure { startSet = map (file: { key = file.url; inherit file; }) urls; uniqueFiles = map (x: x.file) (genericClosure { startSet = map (file: { key = with file; (if type == null then "" else type + "+") + hash; inherit file; }) files; operator = const [ ]; }); urls = map (drv: { url = head (drv.urls or [ drv.url ]); hash = drv.outputHash; isPatch = (drv?postFetch && drv.postFetch != ""); type = drv.outputHashAlgo; name = drv.name; }) fetchurlDependencies; files = map (drv: { urls = drv.urls or [ drv.url ]; hash = drv.outputHash; isPatch = (drv?postFetch && drv.postFetch != ""); type = drv.outputHashAlgo; name = drv.name; }) fetchurlDependencies; fetchurlDependencies = filter Loading Loading @@ -47,4 +47,4 @@ let canEval = val: (builtins.tryEval val).success; in uniqueUrls in uniqueFiles Loading
flake.nix +13 −0 Original line number Diff line number Diff line Loading @@ -57,6 +57,19 @@ nixosModules = { notDetected = ./nixos/modules/installer/scan/not-detected.nix; /* Make the `nixpkgs.*` configuration read-only. Guarantees that `pkgs` is the way you initialize it. Example: { imports = [ nixpkgs.nixosModules.readOnlyPkgs ]; nixpkgs.pkgs = nixpkgs.legacyPackages.x86_64-linux; } */ readOnlyPkgs = ./nixos/modules/misc/nixpkgs/read-only.nix; }; }; }
lib/types.nix +8 −0 Original line number Diff line number Diff line Loading @@ -476,6 +476,14 @@ rec { check = x: isDerivation x && hasAttr "shellPath" x; }; pkgs = addCheck (unique { message = "A Nixpkgs pkgs set can not be merged with another pkgs set."; } attrs // { name = "pkgs"; descriptionClass = "noun"; description = "Nixpkgs package set"; }) (x: (x._type or null) == "pkgs"); path = mkOptionType { name = "path"; descriptionClass = "noun"; Loading
maintainers/maintainer-list.nix +6 −0 Original line number Diff line number Diff line Loading @@ -15950,6 +15950,12 @@ githubId = 8577941; name = "Kevin Rauscher"; }; tomaskala = { email = "public+nixpkgs@tomaskala.com"; github = "tomaskala"; githubId = 7727887; name = "Tomas Kala"; }; tomberek = { email = "tomberek@gmail.com"; matrix = "@tomberek:matrix.org"; Loading
maintainers/scripts/copy-tarballs.pl +51 −48 Original line number Diff line number Diff line Loading @@ -162,13 +162,18 @@ elsif (defined $expr) { # Check every fetchurl call discovered by find-tarballs.nix. my $mirrored = 0; my $have = 0; foreach my $fetch (sort { $a->{url} cmp $b->{url} } @{$fetches}) { my $url = $fetch->{url}; foreach my $fetch (sort { $a->{urls}->[0] cmp $b->{urls}->[0] } @{$fetches}) { my $urls = $fetch->{urls}; my $algo = $fetch->{type}; my $hash = $fetch->{hash}; my $name = $fetch->{name}; my $isPatch = $fetch->{isPatch}; if ($isPatch) { print STDERR "skipping $urls->[0] (support for patches is missing)\n"; next; } if ($hash =~ /^([a-z0-9]+)-([A-Za-z0-9+\/=]+)$/) { $algo = $1; $hash = `nix hash to-base16 $hash` or die; Loading @@ -183,6 +188,9 @@ elsif (defined $expr) { chomp $hash; } my $storePath = makeFixedOutputPath(0, $algo, $hash, $name); for my $url (@$urls) { if (defined $ENV{DEBUG}) { print "$url $algo $hash\n"; next; Loading @@ -193,25 +201,18 @@ elsif (defined $expr) { next; } if ($isPatch) { print STDERR "skipping $url (support for patches is missing)\n"; next; } next if defined $exclude && $url =~ /$exclude/; if (alreadyMirrored($algo, $hash)) { $have++; next; last; } my $storePath = makeFixedOutputPath(0, $algo, $hash, $name); print STDERR "mirroring $url ($storePath, $algo, $hash)...\n"; if ($dryRun) { $mirrored++; next; last; } # Substitute the output. Loading Loading @@ -239,6 +240,8 @@ elsif (defined $expr) { uploadFile($storePath, $url); $mirrored++; last; } } print STDERR "mirrored $mirrored files, already have $have files\n"; Loading
maintainers/scripts/find-tarballs.nix +4 −4 Original line number Diff line number Diff line Loading @@ -9,12 +9,12 @@ let root = expr; uniqueUrls = map (x: x.file) (genericClosure { startSet = map (file: { key = file.url; inherit file; }) urls; uniqueFiles = map (x: x.file) (genericClosure { startSet = map (file: { key = with file; (if type == null then "" else type + "+") + hash; inherit file; }) files; operator = const [ ]; }); urls = map (drv: { url = head (drv.urls or [ drv.url ]); hash = drv.outputHash; isPatch = (drv?postFetch && drv.postFetch != ""); type = drv.outputHashAlgo; name = drv.name; }) fetchurlDependencies; files = map (drv: { urls = drv.urls or [ drv.url ]; hash = drv.outputHash; isPatch = (drv?postFetch && drv.postFetch != ""); type = drv.outputHashAlgo; name = drv.name; }) fetchurlDependencies; fetchurlDependencies = filter Loading Loading @@ -47,4 +47,4 @@ let canEval = val: (builtins.tryEval val).success; in uniqueUrls in uniqueFiles