nix-init: refactor with nixfmt-rfc-style, passthru.tests.version and removing darwin sdk (#356985)
This commit is contained in:
@@ -1,20 +1,22 @@
|
||||
{ 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,
|
||||
spdx-license-list-data,
|
||||
nix,
|
||||
nurl,
|
||||
testers,
|
||||
nix-init,
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -51,10 +53,6 @@ rustPlatform.buildRustPackage rec {
|
||||
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;
|
||||
@@ -88,6 +86,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";
|
||||
|
||||
Reference in New Issue
Block a user