Skip to content

Commit

Permalink
treewide: remove unused lib (and other) arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Sigmanificient committed Jul 26, 2024
1 parent da8fd5b commit 6dd4410
Show file tree
Hide file tree
Showing 141 changed files with 120 additions and 218 deletions.
2 changes: 1 addition & 1 deletion lib/tests/modules/define-_module-args-custom.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, ... }:
{ ... }:

{
config = {
Expand Down
2 changes: 1 addition & 1 deletion lib/tests/modules/define-enable-with-custom-arg.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, custom, ... }:
{ custom, ... }:

{
config = {
Expand Down
2 changes: 1 addition & 1 deletion lib/tests/modules/disable-declare-enable.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, ... }:
{ ... }:

{
disabledModules = [ ./declare-enable.nix ];
Expand Down
2 changes: 1 addition & 1 deletion lib/tests/modules/disable-define-enable-string-path.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, ... }:
{ ... }:

{
disabledModules = [ (toString ./define-enable.nix) ];
Expand Down
2 changes: 1 addition & 1 deletion lib/tests/modules/disable-define-enable.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, ... }:
{ ... }:

{
disabledModules = [ ./define-enable.nix ];
Expand Down
2 changes: 1 addition & 1 deletion lib/tests/modules/disable-enable-modules.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, ... }:
{ ... }:

{
disabledModules = [ "define-enable.nix" "declare-enable.nix" ];
Expand Down
2 changes: 1 addition & 1 deletion lib/tests/modules/doRename-condition-enable.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, lib, ... }:
{ config, ... }:
{
config = {
services.foo.enable = true;
Expand Down
2 changes: 1 addition & 1 deletion lib/tests/modules/doRename-condition-migrated.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, lib, ... }:
{ config, ... }:
{
config = {
services.foos."".bar = "baz";
Expand Down
2 changes: 1 addition & 1 deletion lib/tests/modules/doRename-condition-no-enable.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, lib, options, ... }:
{ config, options, ... }:
{
config = {
result =
Expand Down
2 changes: 1 addition & 1 deletion lib/tests/modules/import-from-store.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, ... }:
{ ... }:
{

imports = [
Expand Down
2 changes: 1 addition & 1 deletion lib/tests/modules/merge-typeless-option.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, ... }:
{ ... }:

let
typeless =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, lib, modulesPath, ... }:
{ modulesPath, ... }:

{
imports =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, lib, modulesPath, ... }:
{ modulesPath, ... }:

{
imports =
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/profiles/docker-container.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, pkgs, ... }:

let
inherit (pkgs) writeScript;
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/profiles/qemu-guest.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Common configuration for virtual machines running under QEMU (using
# virtio).

{ config, lib, ... }:
{ ... }:

{
boot.initrd.availableKernelModules = [ "virtio_net" "virtio_pci" "virtio_mmio" "virtio_blk" "virtio_scsi" "9p" "9pnet_virtio" ];
Expand Down
2 changes: 1 addition & 1 deletion nixos/modules/security/apparmor/profiles.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, pkgs, ... }:
let apparmor = config.security.apparmor; in
{
config.security.apparmor.packages = [ pkgs.apparmor-profiles ];
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/common/acme/client/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, nodes, pkgs, ... }:
{ nodes, ... }:
let
caCert = nodes.acme.test-support.acme.caCert;
caDomain = nodes.acme.test-support.acme.caDomain;
Expand Down
2 changes: 1 addition & 1 deletion nixos/tests/installed-tests/ostree.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ pkgs, lib, makeInstalledTest, ... }:
{ pkgs, makeInstalledTest, ... }:

makeInstalledTest {
tested = pkgs.ostree;
Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/backup/timeshift/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{ callPackage
, timeshift-unwrapped
, lib
, rsync
, coreutils
, mount
Expand Down
3 changes: 1 addition & 2 deletions pkgs/applications/blockchains/sparrow/fhsenv.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, buildFHSEnv
{ buildFHSEnv
, sparrow-unwrapped
}:

Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/editors/neovim/tests/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# run tests by building `neovim.tests`
{ vimUtils, writeText, neovim, vimPlugins
, lib, neovimUtils, wrapNeovimUnstable
, neovimUtils, wrapNeovimUnstable
, neovim-unwrapped
, fetchFromGitLab
, runCommandLocal
Expand Down
3 changes: 1 addition & 2 deletions pkgs/applications/gis/qgis/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, makeWrapper
{ makeWrapper
, nixosTests
, symlinkJoin

Expand Down
3 changes: 1 addition & 2 deletions pkgs/applications/gis/qgis/ltr.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, makeWrapper
{ makeWrapper
, nixosTests
, symlinkJoin

Expand Down
1 change: 0 additions & 1 deletion pkgs/applications/misc/blender/wrapper.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ stdenv
, lib
, blender
, makeWrapper
, extraModules ? []
Expand Down
3 changes: 1 addition & 2 deletions pkgs/applications/networking/cluster/tubekit/wrapper.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, runCommand
{ runCommand
, makeWrapper
, tubekit-unwrapped
, pname ? "tubekit"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
{ stdenv
, fetchurl
, pname
, version
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/science/logic/msat/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, ocamlPackages }:
{ ocamlPackages }:

with ocamlPackages; buildDunePackage {
pname = "msat-bin";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/science/math/wolfram-engine/notebook.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, writeScriptBin, jupyter, wolfram-for-jupyter-kernel }:
{ stdenv, writeScriptBin, jupyter, wolfram-for-jupyter-kernel }:

let
wolfram-jupyter = jupyter.override { definitions = { wolfram = wolfram-for-jupyter-kernel.definition; }; };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{ lib
, appimageTools
{ appimageTools
, fetchurl
, makeWrapper
, gtk3
, gsettings-desktop-schemas
, pname
, version
, hash
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/window-managers/taffybar/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, stdenv, ghcWithPackages, taffybar, makeWrapper, packages ? (x: []) }:
{ stdenv, ghcWithPackages, taffybar, makeWrapper, packages ? (x: []) }:

let
taffybarEnv = ghcWithPackages (self: [
Expand Down
2 changes: 1 addition & 1 deletion pkgs/build-support/fetchtorrent/tests.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ testers, fetchtorrent, lib, ... }:
{ testers, fetchtorrent, ... }:

let
wired-cd.meta.license = [
Expand Down
2 changes: 1 addition & 1 deletion pkgs/build-support/trivial-builders/test/concat-test.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ callPackage, lib, pkgs, runCommand, concatText, writeText, hello, emptyFile }:
{ runCommand, concatText, writeText, hello, emptyFile }:
let
stri = writeText "pathToTest";
txt1 = stri "abc";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/au/authentik/ldap.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, buildGoModule, authentik }:
{ buildGoModule, authentik }:

buildGoModule {
pname = "authentik-ldap-outpost";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/au/authentik/radius.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, buildGoModule, authentik }:
{ buildGoModule, authentik }:

buildGoModule {
pname = "authentik-radius-outpost";
Expand Down
3 changes: 1 addition & 2 deletions pkgs/by-name/cu/cue/tests/001-all-good.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, cue
{ cue
, runCommand
}:

Expand Down
3 changes: 1 addition & 2 deletions pkgs/by-name/de/deltachat-repl/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, rustPlatform
{ rustPlatform
, libdeltachat
, perl
, pkg-config
Expand Down
3 changes: 1 addition & 2 deletions pkgs/by-name/de/deltachat-rpc-server/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, rustPlatform
{ rustPlatform
, libdeltachat
, perl
, pkg-config
Expand Down
20 changes: 20 additions & 0 deletions pkgs/by-name/du/duckstation/shaderc-patched.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
fetchpatch,
duckstation,
shaderc,
}:

shaderc.overrideAttrs (old: {
pname = "shaderc-patched-for-duckstation";
patches = (old.patches or [ ]) ++ [
(fetchpatch {
url = "file://${duckstation.src}/scripts/shaderc-changes.patch";
hash = "sha256-Ps/D+CdSbjVWg3ZGOEcgbpQbCNkI5Nuizm4E5qiM9Wo=";
excludes = [
"CHANGES"
"CMakeLists.txt"
"libshaderc/CMakeLists.txt"
];
})
];
})
4 changes: 1 addition & 3 deletions pkgs/by-name/ei/eintopf/frontend.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{ lib
, stdenv
{ stdenv
, fetchYarnDeps
, fixup-yarn-lock
, yarn
, fetchFromGitea
, src
, version
, nodejs
Expand Down
3 changes: 1 addition & 2 deletions pkgs/by-name/el/elvish/tests/expect-version.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
{ stdenv
, elvish
, substituteAll
}:
Expand Down
2 changes: 1 addition & 1 deletion pkgs/by-name/gh/ghdl/test-simple.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, lib, ghdl-llvm, ghdl-mcode, ghdl-gcc, backend }:
{ stdenv, ghdl-llvm, ghdl-mcode, ghdl-gcc, backend }:

let
ghdl = if backend == "llvm" then ghdl-llvm else if backend == "gcc" then ghdl-gcc else ghdl-mcode;
Expand Down
3 changes: 1 addition & 2 deletions pkgs/by-name/ha/haunt/tests/001-test-version.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
{ stdenv
, haunt
}:

Expand Down
1 change: 0 additions & 1 deletion pkgs/by-name/lm/lmstudio/darwin.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ stdenv
, fetchurl
, undmg
, lib
, meta
, pname
, version
Expand Down
3 changes: 1 addition & 2 deletions pkgs/by-name/lm/lmstudio/linux.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, appimageTools
{ appimageTools
, fetchurl
, version
, pname
Expand Down
3 changes: 1 addition & 2 deletions pkgs/by-name/pa/parsedmarc/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, python3
{ python3
, fetchFromGitHub
}:

Expand Down
1 change: 0 additions & 1 deletion pkgs/by-name/ra/ratchet/tests.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
lib,
runCommand,
ratchet,
}: let
Expand Down
3 changes: 1 addition & 2 deletions pkgs/by-name/re/realvnc-vnc-viewer/darwin.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenvNoCC
{ stdenvNoCC
, fetchurl
, undmg
, pname
Expand Down
3 changes: 1 addition & 2 deletions pkgs/by-name/re/realvnc-vnc-viewer/linux.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
{ stdenv
, fetchurl
, autoPatchelfHook
, rpmextract
Expand Down
6 changes: 1 addition & 5 deletions pkgs/by-name/sd/SDL2_image_2_0/package.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Dependency of pygame, toppler
{
lib,
SDL2_image,
fetchurl,
}:
{ SDL2_image, fetchurl }:

SDL2_image.overrideAttrs (oldAttrs: {
version = "2.0.5";
Expand Down
6 changes: 1 addition & 5 deletions pkgs/by-name/sd/SDL2_image_2_6/package.nix
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Dependency for hedgewars:
# https://github.com/NixOS/nixpkgs/pull/274185#issuecomment-1856764786
{
lib,
SDL2_image,
fetchurl,
}:
{ SDL2_image, fetchurl }:

SDL2_image.overrideAttrs (oldAttrs: {
version = "2.6.3";
Expand Down
3 changes: 1 addition & 2 deletions pkgs/by-name/sp/spigot/tests/approximation.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
{ stdenv
, spigot
}:

Expand Down
1 change: 0 additions & 1 deletion pkgs/by-name/sw/swayfx/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
lib,
swayfx-unwrapped,
sway,
# Used by the NixOS module:
Expand Down
3 changes: 1 addition & 2 deletions pkgs/by-name/tu/tuxclocker-nvidia-plugin/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
{ stdenv
, boost
, libX11
, libXext
Expand Down
4 changes: 1 addition & 3 deletions pkgs/by-name/tu/tuxclocker-plugins/package.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{ lib
, stdenv
{ stdenv
, boost
, cmake
, gettext
, libdrm
, meson
Expand Down
3 changes: 1 addition & 2 deletions pkgs/by-name/uc/ucg/tests/simple.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{ lib
, stdenv
{ stdenv
, ucg
}:

Expand Down
Loading

0 comments on commit 6dd4410

Please sign in to comment.