From b128929035dac96b788dd3262b2a0eec5a56f203 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Tue, 19 Nov 2024 00:09:31 +0900 Subject: [PATCH 1/3] nix-init: format with nixfmt-rfc-style --- pkgs/by-name/ni/nix-init/package.nix | 62 +++++++++++++++------------- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/pkgs/by-name/ni/nix-init/package.nix b/pkgs/by-name/ni/nix-init/package.nix index 54e35a2d9de4..83deac9e230b 100644 --- a/pkgs/by-name/ni/nix-init/package.nix +++ b/pkgs/by-name/ni/nix-init/package.nix @@ -1,20 +1,21 @@ -{ lib -, writeText -, rustPlatform -, fetchFromGitHub -, curl -, installShellFiles -, pkg-config -, bzip2 -, libgit2 -, openssl -, zlib -, zstd -, stdenv -, darwin -, spdx-license-list-data -, nix -, nurl +{ + lib, + writeText, + rustPlatform, + fetchFromGitHub, + curl, + installShellFiles, + pkg-config, + bzip2, + libgit2, + openssl, + zlib, + zstd, + stdenv, + darwin, + spdx-license-list-data, + nix, + nurl, }: let @@ -44,18 +45,21 @@ rustPlatform.buildRustPackage rec { pkg-config ]; - buildInputs = [ - bzip2 - curl - libgit2 - openssl - zlib - zstd - ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.apple_sdk.frameworks.Security - ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ - darwin.apple_sdk.frameworks.CoreFoundation - ]; + buildInputs = + [ + bzip2 + curl + libgit2 + openssl + zlib + zstd + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + darwin.apple_sdk.frameworks.Security + ] + ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ + darwin.apple_sdk.frameworks.CoreFoundation + ]; buildNoDefaultFeatures = true; From 26cea2436d940e4cda749ccf1e05e53ac8285e9c Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Tue, 19 Nov 2024 00:11:54 +0900 Subject: [PATCH 2/3] nix-init: add passthru.tests.version --- pkgs/by-name/ni/nix-init/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/ni/nix-init/package.nix b/pkgs/by-name/ni/nix-init/package.nix index 83deac9e230b..510fa3c47c2e 100644 --- a/pkgs/by-name/ni/nix-init/package.nix +++ b/pkgs/by-name/ni/nix-init/package.nix @@ -16,6 +16,8 @@ spdx-license-list-data, nix, nurl, + testers, + nix-init, }: let @@ -92,6 +94,10 @@ rustPlatform.buildRustPackage rec { ZSTD_SYS_USE_PKG_CONFIG = true; }; + passthru.tests.version = testers.testVersion { + package = nix-init; + }; + meta = with lib; { description = "Command line tool to generate Nix packages from URLs"; mainProgram = "nix-init"; From ee2d6d1ea42554489bebb56e1c2ccc1665c11016 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Fri, 22 Nov 2024 21:59:03 +0900 Subject: [PATCH 3/3] nix-init: remove unnecessary darwin sdk nix-init: remove outdated input Co-authored-by: uncenter <47499684+uncenter@users.noreply.github.com> --- pkgs/by-name/ni/nix-init/package.nix | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/pkgs/by-name/ni/nix-init/package.nix b/pkgs/by-name/ni/nix-init/package.nix index 510fa3c47c2e..7f5355789016 100644 --- a/pkgs/by-name/ni/nix-init/package.nix +++ b/pkgs/by-name/ni/nix-init/package.nix @@ -12,7 +12,6 @@ zlib, zstd, stdenv, - darwin, spdx-license-list-data, nix, nurl, @@ -47,21 +46,14 @@ rustPlatform.buildRustPackage rec { pkg-config ]; - buildInputs = - [ - bzip2 - curl - libgit2 - openssl - zlib - zstd - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ - darwin.apple_sdk.frameworks.Security - ] - ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) [ - darwin.apple_sdk.frameworks.CoreFoundation - ]; + buildInputs = [ + bzip2 + curl + libgit2 + openssl + zlib + zstd + ]; buildNoDefaultFeatures = true;