Skip to content

Commit

Permalink
Migrate packages to pkgs/by-name, format with nixfmt-rfc-style (#342625)
Browse files Browse the repository at this point in the history
  • Loading branch information
fpletz authored Sep 18, 2024
2 parents 4b87f88 + 560d82a commit 421ef9a
Show file tree
Hide file tree
Showing 19 changed files with 320 additions and 243 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{ lib
, stdenv
, fetchFromGitLab
, openldap
, libkrb5
, libxslt
, autoreconfHook
, pkg-config
, cyrus_sasl
, util-linux
, xmlto
, docbook_xsl
, docbook_xml_dtd_43
{
lib,
stdenv,
autoreconfHook,
cyrus_sasl,
docbook_xml_dtd_43,
docbook_xsl,
fetchFromGitLab,
libkrb5,
libxslt,
openldap,
pkg-config,
util-linux,
xmlto,
}:

stdenv.mkDerivation rec {
Expand All @@ -20,40 +21,40 @@ stdenv.mkDerivation rec {
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "realmd";
repo = pname;
repo = "adcli";
rev = version;
sha256 = "sha256-dipNKlIdc1DpXLg/YJjUxZlNoMFy+rt8Y/+AfWFA4dE=";
hash = "sha256-dipNKlIdc1DpXLg/YJjUxZlNoMFy+rt8Y/+AfWFA4dE=";
};

nativeBuildInputs = [
autoreconfHook
pkg-config
docbook_xsl
pkg-config
util-linux
xmlto
];

buildInputs = [
openldap
cyrus_sasl
libkrb5
libxslt
cyrus_sasl
openldap
];

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

postPatch = ''
substituteInPlace tools/Makefile.am \
--replace 'sbin_PROGRAMS' 'bin_PROGRAMS'
--replace-fail 'sbin_PROGRAMS' 'bin_PROGRAMS'
substituteInPlace doc/Makefile.am \
--replace 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl' \
'${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl'
--replace-fail 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl' \
'${docbook_xsl}/xml/xsl/docbook/manpages/docbook.xsl'
function patch_docbook() {
substituteInPlace $1 \
--replace "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" \
"${docbook_xml_dtd_43}/xml/dtd/docbook/docbookx.dtd"
--replace-fail "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" \
"${docbook_xml_dtd_43}/xml/dtd/docbook/docbookx.dtd"
}
patch_docbook doc/adcli.xml
patch_docbook doc/adcli-devel.xml
Expand All @@ -65,7 +66,10 @@ stdenv.mkDerivation rec {
description = "Helper library and tools for Active Directory client operations";
mainProgram = "adcli";
license = licenses.lgpl21Only;
maintainers = with maintainers; [ SohamG anthonyroussel ];
maintainers = with maintainers; [
SohamG
anthonyroussel
];
platforms = platforms.linux;
};
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{ stdenv
, lib
, fetchFromGitHub
, bash
, python3
, installShellFiles
, gawk
, curl
{
stdenv,
lib,
bash,
curl,
fetchFromGitHub,
gawk,
installShellFiles,
python3,
}:

stdenv.mkDerivation rec {
Expand All @@ -19,20 +20,23 @@ stdenv.mkDerivation rec {
hash = "sha256-plTBh2LAXkYVSxN0IZJQuPr7QxD7+OAqHl/Zl8JPCmg=";
};

outputs = [ "out" "man" ];
outputs = [
"out"
"man"
];

strictDeps = true;

nativeBuildInputs = [
installShellFiles
];

buildInputs = [
bash
python3
];

nativeBuildInputs = [
installShellFiles
];

installPhase = ''
postInstall = ''
install -Dm755 -t $out/bin/ ebsnvme-id
install -Dm755 -t $out/bin/ ec2-metadata
install -Dm755 -t $out/bin/ ec2nvme-nsid
Expand All @@ -48,14 +52,14 @@ stdenv.mkDerivation rec {
'';

postFixup = ''
for i in $out/etc/udev/rules.d/*.rules $out/lib/udev/rules.d/*.rules ; do
substituteInPlace "$i" \
--replace '/usr/sbin' "$out/bin" \
--replace '/bin/awk' '${gawk}/bin/awk'
done
substituteInPlace $out/lib/udev/rules.d/{51-ec2-hvm-devices,70-ec2-nvme-devices}.rules \
--replace-fail '/usr/sbin' "$out/bin"
substituteInPlace $out/lib/udev/rules.d/53-ec2-read-ahead-kb.rules \
--replace-fail '/bin/awk' '${gawk}/bin/awk'
substituteInPlace "$out/bin/ec2-metadata" \
--replace 'curl' '${curl}/bin/curl'
--replace-fail 'curl' '${curl}/bin/curl'
'';

doInstallCheck = true;
Expand All @@ -73,6 +77,10 @@ stdenv.mkDerivation rec {
description = "Contains a set of utilities and settings for Linux deployments in EC2";
homepage = "https://github.com/amazonlinux/amazon-ec2-utils";
license = licenses.mit;
maintainers = with maintainers; [ ketzacoatl thefloweringash anthonyroussel ];
maintainers = with maintainers; [
ketzacoatl
thefloweringash
anthonyroussel
];
};
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{ lib, buildGoModule, fetchFromGitHub }:
{
lib,
asouldocs,
buildGoModule,
fetchFromGitHub,
testers,
}:

buildGoModule rec {
pname = "asouldocs";
Expand All @@ -13,6 +19,11 @@ buildGoModule rec {

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

passthru.tests.version = testers.testVersion {
package = asouldocs;
command = "asouldocs --version";
};

meta = with lib; {
description = "Web server for multi-language, real-time synchronization and searchable documentation";
homepage = "https://asouldocs.dev/";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{ lib
, python3
, fetchPypi
, nix-update-script
, testers
, aws-encryption-sdk-cli
{
lib,
aws-encryption-sdk-cli,
fetchPypi,
nix-update-script,
python3,
testers,
}:

let
Expand Down Expand Up @@ -41,8 +42,8 @@ localPython.pkgs.buildPythonApplication rec {
attrs
aws-encryption-sdk
base64io
urllib3
setuptools # for pkg_resources
urllib3
];

doCheck = true;
Expand All @@ -59,7 +60,10 @@ localPython.pkgs.buildPythonApplication rec {
];

# Upstream did not adapt to pytest 8 yet.
pytestFlagsArray = [ "-W" "ignore::pytest.PytestRemovedIn8Warning" ];
pytestFlagsArray = [
"-W"
"ignore::pytest.PytestRemovedIn8Warning"
];

passthru = {
updateScript = nix-update-script { };
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
lib,
stdenvNoCC,
fetchurl,
ant,
fetchurl,
jdk,
nixosTests,
stripJavaArchivesHook,
unzip,
nixosTests,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{ lib
, stdenv
, fetchurl
, flex
, pcsclite
, pkg-config
, libusb1
, perl
, zlib
, gitUpdater
{
lib,
stdenv,
fetchurl,
flex,
gitUpdater,
libusb1,
pcsclite,
perl,
pkg-config,
zlib,
}:

stdenv.mkDerivation rec {
Expand All @@ -21,7 +22,7 @@ stdenv.mkDerivation rec {

postPatch = ''
patchShebangs .
substituteInPlace src/Makefile.in --replace /bin/echo echo
substituteInPlace src/Makefile.in --replace-fail /bin/echo echo
'';

configureFlags = [
Expand All @@ -39,25 +40,25 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [
flex
pkg-config
perl
pkg-config
];

buildInputs = [
pcsclite
libusb1
pcsclite
zlib
];

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

# The resulting shared object ends up outside of the default paths which are
# usually getting stripped.
stripDebugList = ["pcsc"];
stripDebugList = [ "pcsc" ];

passthru.updateScript = gitUpdater {
url = "https://salsa.debian.org/rousseau/CCID.git";
Expand Down
Loading

0 comments on commit 421ef9a

Please sign in to comment.