Skip to content

Commit 421ef9a

Browse files
authored
Migrate packages to pkgs/by-name, format with nixfmt-rfc-style (#342625)
2 parents 4b87f88 + 560d82a commit 421ef9a

File tree

19 files changed

+320
-243
lines changed

19 files changed

+320
-243
lines changed
Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
{ lib
2-
, stdenv
3-
, fetchFromGitLab
4-
, openldap
5-
, libkrb5
6-
, libxslt
7-
, autoreconfHook
8-
, pkg-config
9-
, cyrus_sasl
10-
, util-linux
11-
, xmlto
12-
, docbook_xsl
13-
, docbook_xml_dtd_43
1+
{
2+
lib,
3+
stdenv,
4+
autoreconfHook,
5+
cyrus_sasl,
6+
docbook_xml_dtd_43,
7+
docbook_xsl,
8+
fetchFromGitLab,
9+
libkrb5,
10+
libxslt,
11+
openldap,
12+
pkg-config,
13+
util-linux,
14+
xmlto,
1415
}:
1516

1617
stdenv.mkDerivation rec {
@@ -20,40 +21,40 @@ stdenv.mkDerivation rec {
2021
src = fetchFromGitLab {
2122
domain = "gitlab.freedesktop.org";
2223
owner = "realmd";
23-
repo = pname;
24+
repo = "adcli";
2425
rev = version;
25-
sha256 = "sha256-dipNKlIdc1DpXLg/YJjUxZlNoMFy+rt8Y/+AfWFA4dE=";
26+
hash = "sha256-dipNKlIdc1DpXLg/YJjUxZlNoMFy+rt8Y/+AfWFA4dE=";
2627
};
2728

2829
nativeBuildInputs = [
2930
autoreconfHook
30-
pkg-config
3131
docbook_xsl
32+
pkg-config
3233
util-linux
3334
xmlto
3435
];
3536

3637
buildInputs = [
37-
openldap
38+
cyrus_sasl
3839
libkrb5
3940
libxslt
40-
cyrus_sasl
41+
openldap
4142
];
4243

4344
configureFlags = [ "--disable-debug" ];
4445

4546
postPatch = ''
4647
substituteInPlace tools/Makefile.am \
47-
--replace 'sbin_PROGRAMS' 'bin_PROGRAMS'
48+
--replace-fail 'sbin_PROGRAMS' 'bin_PROGRAMS'
4849
4950
substituteInPlace doc/Makefile.am \
50-
--replace 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl' \
51-
'${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl'
51+
--replace-fail 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl' \
52+
'${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl'
5253
5354
function patch_docbook() {
5455
substituteInPlace $1 \
55-
--replace "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" \
56-
"${docbook_xml_dtd_43}/xml/dtd/docbook/docbookx.dtd"
56+
--replace-fail "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" \
57+
"${docbook_xml_dtd_43}/xml/dtd/docbook/docbookx.dtd"
5758
}
5859
patch_docbook doc/adcli.xml
5960
patch_docbook doc/adcli-devel.xml
@@ -65,7 +66,10 @@ stdenv.mkDerivation rec {
6566
description = "Helper library and tools for Active Directory client operations";
6667
mainProgram = "adcli";
6768
license = licenses.lgpl21Only;
68-
maintainers = with maintainers; [ SohamG anthonyroussel ];
69+
maintainers = with maintainers; [
70+
SohamG
71+
anthonyroussel
72+
];
6973
platforms = platforms.linux;
7074
};
7175
}

pkgs/tools/admin/amazon-ec2-utils/default.nix renamed to pkgs/by-name/am/amazon-ec2-utils/package.nix

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
{ stdenv
2-
, lib
3-
, fetchFromGitHub
4-
, bash
5-
, python3
6-
, installShellFiles
7-
, gawk
8-
, curl
1+
{
2+
stdenv,
3+
lib,
4+
bash,
5+
curl,
6+
fetchFromGitHub,
7+
gawk,
8+
installShellFiles,
9+
python3,
910
}:
1011

1112
stdenv.mkDerivation rec {
@@ -19,20 +20,23 @@ stdenv.mkDerivation rec {
1920
hash = "sha256-plTBh2LAXkYVSxN0IZJQuPr7QxD7+OAqHl/Zl8JPCmg=";
2021
};
2122

22-
outputs = [ "out" "man" ];
23+
outputs = [
24+
"out"
25+
"man"
26+
];
2327

2428
strictDeps = true;
2529

30+
nativeBuildInputs = [
31+
installShellFiles
32+
];
33+
2634
buildInputs = [
2735
bash
2836
python3
2937
];
3038

31-
nativeBuildInputs = [
32-
installShellFiles
33-
];
34-
35-
installPhase = ''
39+
postInstall = ''
3640
install -Dm755 -t $out/bin/ ebsnvme-id
3741
install -Dm755 -t $out/bin/ ec2-metadata
3842
install -Dm755 -t $out/bin/ ec2nvme-nsid
@@ -48,14 +52,14 @@ stdenv.mkDerivation rec {
4852
'';
4953

5054
postFixup = ''
51-
for i in $out/etc/udev/rules.d/*.rules $out/lib/udev/rules.d/*.rules ; do
52-
substituteInPlace "$i" \
53-
--replace '/usr/sbin' "$out/bin" \
54-
--replace '/bin/awk' '${gawk}/bin/awk'
55-
done
55+
substituteInPlace $out/lib/udev/rules.d/{51-ec2-hvm-devices,70-ec2-nvme-devices}.rules \
56+
--replace-fail '/usr/sbin' "$out/bin"
57+
58+
substituteInPlace $out/lib/udev/rules.d/53-ec2-read-ahead-kb.rules \
59+
--replace-fail '/bin/awk' '${gawk}/bin/awk'
5660
5761
substituteInPlace "$out/bin/ec2-metadata" \
58-
--replace 'curl' '${curl}/bin/curl'
62+
--replace-fail 'curl' '${curl}/bin/curl'
5963
'';
6064

6165
doInstallCheck = true;
@@ -73,6 +77,10 @@ stdenv.mkDerivation rec {
7377
description = "Contains a set of utilities and settings for Linux deployments in EC2";
7478
homepage = "https://github.com/amazonlinux/amazon-ec2-utils";
7579
license = licenses.mit;
76-
maintainers = with maintainers; [ ketzacoatl thefloweringash anthonyroussel ];
80+
maintainers = with maintainers; [
81+
ketzacoatl
82+
thefloweringash
83+
anthonyroussel
84+
];
7785
};
7886
}

pkgs/servers/asouldocs/default.nix renamed to pkgs/by-name/as/asouldocs/package.nix

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
{ lib, buildGoModule, fetchFromGitHub }:
1+
{
2+
lib,
3+
asouldocs,
4+
buildGoModule,
5+
fetchFromGitHub,
6+
testers,
7+
}:
28

39
buildGoModule rec {
410
pname = "asouldocs";
@@ -13,6 +19,11 @@ buildGoModule rec {
1319

1420
vendorHash = "sha256-T/KLiSK6bxXGkmVJ5aGrfHTUfLs/ElGyWSoCL5kb/KU=";
1521

22+
passthru.tests.version = testers.testVersion {
23+
package = asouldocs;
24+
command = "asouldocs --version";
25+
};
26+
1627
meta = with lib; {
1728
description = "Web server for multi-language, real-time synchronization and searchable documentation";
1829
homepage = "https://asouldocs.dev/";

pkgs/tools/admin/aws-encryption-sdk-cli/default.nix renamed to pkgs/by-name/aw/aws-encryption-sdk-cli/package.nix

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
{ lib
2-
, python3
3-
, fetchPypi
4-
, nix-update-script
5-
, testers
6-
, aws-encryption-sdk-cli
1+
{
2+
lib,
3+
aws-encryption-sdk-cli,
4+
fetchPypi,
5+
nix-update-script,
6+
python3,
7+
testers,
78
}:
89

910
let
@@ -41,8 +42,8 @@ localPython.pkgs.buildPythonApplication rec {
4142
attrs
4243
aws-encryption-sdk
4344
base64io
44-
urllib3
4545
setuptools # for pkg_resources
46+
urllib3
4647
];
4748

4849
doCheck = true;
@@ -59,7 +60,10 @@ localPython.pkgs.buildPythonApplication rec {
5960
];
6061

6162
# Upstream did not adapt to pytest 8 yet.
62-
pytestFlagsArray = [ "-W" "ignore::pytest.PytestRemovedIn8Warning" ];
63+
pytestFlagsArray = [
64+
"-W"
65+
"ignore::pytest.PytestRemovedIn8Warning"
66+
];
6367

6468
passthru = {
6569
updateScript = nix-update-script { };

pkgs/servers/http/tomcat/axis2/default.nix renamed to pkgs/by-name/ax/axis2/package.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
lib,
33
stdenvNoCC,
4-
fetchurl,
54
ant,
5+
fetchurl,
66
jdk,
7+
nixosTests,
78
stripJavaArchivesHook,
89
unzip,
9-
nixosTests,
1010
}:
1111

1212
stdenvNoCC.mkDerivation (finalAttrs: {

pkgs/tools/security/ccid/default.nix renamed to pkgs/by-name/cc/ccid/package.nix

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
{ lib
2-
, stdenv
3-
, fetchurl
4-
, flex
5-
, pcsclite
6-
, pkg-config
7-
, libusb1
8-
, perl
9-
, zlib
10-
, gitUpdater
1+
{
2+
lib,
3+
stdenv,
4+
fetchurl,
5+
flex,
6+
gitUpdater,
7+
libusb1,
8+
pcsclite,
9+
perl,
10+
pkg-config,
11+
zlib,
1112
}:
1213

1314
stdenv.mkDerivation rec {
@@ -21,7 +22,7 @@ stdenv.mkDerivation rec {
2122

2223
postPatch = ''
2324
patchShebangs .
24-
substituteInPlace src/Makefile.in --replace /bin/echo echo
25+
substituteInPlace src/Makefile.in --replace-fail /bin/echo echo
2526
'';
2627

2728
configureFlags = [
@@ -39,25 +40,25 @@ stdenv.mkDerivation rec {
3940

4041
nativeBuildInputs = [
4142
flex
42-
pkg-config
4343
perl
44+
pkg-config
4445
];
4546

4647
buildInputs = [
47-
pcsclite
4848
libusb1
49+
pcsclite
4950
zlib
5051
];
5152

5253
postInstall = ''
5354
install -Dm 0444 -t $out/lib/udev/rules.d src/92_pcscd_ccid.rules
5455
substituteInPlace $out/lib/udev/rules.d/92_pcscd_ccid.rules \
55-
--replace "/usr/sbin/pcscd" "${pcsclite}/bin/pcscd"
56+
--replace-fail "/usr/sbin/pcscd" "${pcsclite}/bin/pcscd"
5657
'';
5758

5859
# The resulting shared object ends up outside of the default paths which are
5960
# usually getting stripped.
60-
stripDebugList = ["pcsc"];
61+
stripDebugList = [ "pcsc" ];
6162

6263
passthru.updateScript = gitUpdater {
6364
url = "https://salsa.debian.org/rousseau/CCID.git";

0 commit comments

Comments
 (0)