Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions ci/eval/compare/maintainers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ let
anyMatchingFiles = files: builtins.any anyMatchingFile files;

attrsWithMaintainers = lib.pipe (changedattrs ++ removedattrs) [
(builtins.map (
(map (
name:
let
# Some packages might be reported as changed on a different platform, but
Expand All @@ -46,7 +46,7 @@ let
relevantFilenames =
drv:
(lib.lists.unique (
builtins.map (pos: lib.strings.removePrefix (toString ../..) pos.file) (
map (pos: lib.strings.removePrefix (toString ../..) pos.file) (
builtins.filter (x: x != null) [
((drv.meta or { }).maintainersPosition or null)
((drv.meta or { }).teamsPosition or null)
Expand All @@ -73,15 +73,15 @@ let
)
));

attrsWithFilenames = builtins.map (
attrsWithFilenames = map (
pkg: pkg // { filenames = relevantFilenames pkg.package; }
) attrsWithMaintainers;

attrsWithModifiedFiles = builtins.filter (pkg: anyMatchingFiles pkg.filenames) attrsWithFilenames;

listToPing = lib.concatMap (
pkg:
builtins.map (maintainer: {
map (maintainer: {
id = maintainer.githubId;
inherit (maintainer) github;
packageName = pkg.name;
Expand All @@ -92,7 +92,7 @@ let
byMaintainer = lib.groupBy (ping: toString ping.${if byName then "github" else "id"}) listToPing;

packagesPerMaintainer = lib.attrsets.mapAttrs (
maintainer: packages: builtins.map (pkg: pkg.packageName) packages
maintainer: packages: map (pkg: pkg.packageName) packages
) byMaintainer;
in
packagesPerMaintainer
4 changes: 2 additions & 2 deletions ci/eval/compare/utils.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ rec {
*/
convertToPackagePlatformAttrs =
packagePlatformPaths:
builtins.filter (x: x != null) (builtins.map convertToPackagePlatformAttr packagePlatformPaths);
builtins.filter (x: x != null) (map convertToPackagePlatformAttr packagePlatformPaths);

/*
Converts a list of `packagePlatformPath`s directly to a list of (unique) package names
Expand All @@ -91,7 +91,7 @@ rec {
let
packagePlatformAttrs = convertToPackagePlatformAttrs (uniqueStrings packagePlatformPaths);
in
uniqueStrings (builtins.map (p: p.name) packagePlatformAttrs);
uniqueStrings (map (p: p.name) packagePlatformAttrs);

/*
Group a list of `packagePlatformAttr`s by platforms
Expand Down
2 changes: 1 addition & 1 deletion ci/eval/outpaths.nix
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ let

in
tweak (
(builtins.removeAttrs nixpkgsJobs blacklist)
(removeAttrs nixpkgsJobs blacklist)
// {
nixosTests.simple = nixosJobs.tests.simple;
}
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
)
];
}
// builtins.removeAttrs args [ "modules" ]
// removeAttrs args [ "modules" ]
);
}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rustPlatform.buildRustPackage {
filter =
name: type:
let
name' = builtins.baseNameOf name;
name' = baseNameOf name;
in
name' != "default.nix" && name' != "target";
};
Expand Down
8 changes: 4 additions & 4 deletions maintainers/scripts/haskell/test-configurations.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ let
inherit (pkgs) lib;

# see usage explanation for the input format `files` allows
files' = builtins.map builtins.baseNameOf (if !builtins.isList files then [ files ] else files);
files' = map baseNameOf (if !builtins.isList files then [ files ] else files);

packageSetsWithVersionedHead =
pkgs.haskell.packages
Expand Down Expand Up @@ -99,7 +99,7 @@ let
# match the major and minor version of the GHC the config is intended for, if any
configVersion = lib.concatStrings (builtins.match "ghc-([0-9]+).([0-9]+).x" configName);
# return all package sets under haskell.packages matching the version components
setsForVersion = builtins.map (name: packageSetsWithVersionedHead.${name}) (
setsForVersion = map (name: packageSetsWithVersionedHead.${name}) (
builtins.filter (
setName:
lib.hasPrefix "ghc${configVersion}" setName && (skipBinaryGHCs -> !(lib.hasInfix "Binary" setName))
Expand All @@ -120,7 +120,7 @@ let

# attribute set that has all the attributes of haskellPackages set to null
availableHaskellPackages = builtins.listToAttrs (
builtins.map (attr: lib.nameValuePair attr null) (builtins.attrNames pkgs.haskellPackages)
map (attr: lib.nameValuePair attr null) (builtins.attrNames pkgs.haskellPackages)
);

# evaluate a configuration and only return the attributes changed by it,
Expand Down Expand Up @@ -155,7 +155,7 @@ let
sets = setsForFile fileName;
attrs = overriddenAttrs fileName;
in
lib.concatMap (set: builtins.map (attr: set.${attr}) attrs) sets
lib.concatMap (set: map (attr: set.${attr}) attrs) sets
) files'
);
in
Expand Down
2 changes: 1 addition & 1 deletion maintainers/scripts/rebuild-amount.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ nixexpr() {
];

in
tweak (builtins.removeAttrs hydraJobs blacklist)
tweak (removeAttrs hydraJobs blacklist)
EONIX
}

Expand Down
12 changes: 6 additions & 6 deletions maintainers/scripts/update.nix
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ let
let
maintainer =
if !builtins.hasAttr maintainer' lib.maintainers then
builtins.throw "Maintainer with name `${maintainer'} does not exist in `maintainers/maintainer-list.nix`."
throw "Maintainer with name `${maintainer'} does not exist in `maintainers/maintainer-list.nix`."
else
builtins.getAttr maintainer' lib.maintainers;
in
Expand All @@ -147,7 +147,7 @@ let
pathContent = lib.attrByPath prefix null pkgs;
in
if pathContent == null then
builtins.throw "Attribute path `${path}` does not exist."
throw "Attribute path `${path}` does not exist."
else
packagesWithPath prefix (path: pkg: (get-script pkg != null)) pathContent;

Expand All @@ -158,9 +158,9 @@ let
package = lib.attrByPath (lib.splitString "." path) null pkgs;
in
if package == null then
builtins.throw "Package with an attribute name `${path}` does not exist."
throw "Package with an attribute name `${path}` does not exist."
else if get-script package == null then
builtins.throw "Package with an attribute name `${path}` does not have a `passthru.updateScript` attribute defined."
throw "Package with an attribute name `${path}` does not have a `passthru.updateScript` attribute defined."
else
{
attrPath = path;
Expand All @@ -178,7 +178,7 @@ let
else if path != null then
packagesWithUpdateScript path pkgs
else
builtins.throw "No arguments provided.\n\n${helpText}";
throw "No arguments provided.\n\n${helpText}";

helpText = ''
Please run:
Expand Down Expand Up @@ -242,7 +242,7 @@ let
name = package.name;
pname = lib.getName package;
oldVersion = lib.getVersion package;
updateScript = map builtins.toString (lib.toList (updateScript.command or updateScript));
updateScript = map toString (lib.toList (updateScript.command or updateScript));
supportedFeatures = updateScript.supportedFeatures or [ ];
attrPath = updateScript.attrPath or attrPath;
};
Expand Down
1 change: 0 additions & 1 deletion pkgs/by-name/fa/factorio/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ let
else
''
# Deliberately failing since username/token was not provided, so we can't fetch.
# We can't use builtins.throw since we want the result to be used if the tar is in the store already.
exit 1
'';
failureHook = ''
Expand Down
2 changes: 1 addition & 1 deletion shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let
inherit (import ./ci { inherit nixpkgs system; }) pkgs fmt;

# For `nix-shell -A hello`
curPkgs = builtins.removeAttrs (import ./. { inherit system; }) [
curPkgs = removeAttrs (import ./. { inherit system; }) [
# Although this is what anyone may expect from a `_type = "pkgs"`,
# this file is intended to produce a shell in the first place,
# and a `_type` tag could confuse some code.
Expand Down
Loading